statistics-0.5.0.0: A library of statistical types, data, and functions

Portabilityportable
Stabilityexperimental
Maintainerbos@serpentine.com

Statistics.Function

Contents

Description

Useful functions.

Synopsis

Documentation

minMax :: Vector Double -> (Double, Double)Source

Compute the minimum and maximum of an array in one pass.

sort :: (Unbox e, Ord e) => Vector e -> Vector eSource

Sort an array.

partialSortSource

Arguments

:: (Unbox e, Ord e) 
=> Int

The number k of least elements.

-> Vector e 
-> Vector e 

Partially sort an array, such that the least k elements will be at the front.

indices :: Unbox a => Vector a -> Vector IntSource

Return the indices of an array.

Array setup

createU :: Unbox e => forall s. Int -> (Int -> ST s e) -> ST s (Vector e)Source

Create an array, using the given ST action to populate each element.

createIO :: Unbox e => Int -> (Int -> IO e) -> IO (Vector e)Source

Create an array, using the given IO action to populate each element.