statistics-0.6.0.2: A library of statistical types, data, and functionsSource codeContentsIndex
Statistics.Function
Portabilityportable
Stabilityexperimental
Maintainerbos@serpentine.com
Contents
Vector setup
Description
Useful functions.
Synopsis
minMax :: Vector v Double => v Double -> (Double, Double)
sort :: (Ord e, Vector v e) => v e -> v e
partialSort :: (Vector v e, Ord e) => Int -> v e -> v e
indexed :: (Vector v e, Vector v Int, Vector v (Int, e)) => v e -> v (Int, e)
indices :: (Vector v a, Vector v Int) => v a -> v Int
create :: (PrimMonad m, Vector v e) => Int -> (Int -> m e) -> m (v e)
Documentation
minMax :: Vector v Double => v Double -> (Double, Double)Source
Compute the minimum and maximum of a vector in one pass.
sort :: (Ord e, Vector v e) => v e -> v eSource
Sort a vector.
partialSortSource
:: (Vector v e, Ord e)
=> IntThe number k of least elements.
-> v e
-> v e
Partially sort a vector, such that the least k elements will be at the front.
indexed :: (Vector v e, Vector v Int, Vector v (Int, e)) => v e -> v (Int, e)Source
Zip a vector with its indices.
indices :: (Vector v a, Vector v Int) => v a -> v IntSource
Return the indices of a vector.
Vector setup
create :: (PrimMonad m, Vector v e) => Int -> (Int -> m e) -> m (v e)Source
Create a vector, using the given action to populate each element.
Produced by Haddock version 2.4.2