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

Portabilityportable
Stabilityexperimental
Maintainerbos@serpentine.com

Statistics.Function

Contents

Description

Useful functions.

Synopsis

Documentation

minMax :: UArr Double -> Double :*: DoubleSource

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

sort :: (UA e, Ord e) => UArr e -> UArr eSource

Sort an array.

partialSortSource

Arguments

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

The number k of least elements.

-> UArr e 
-> UArr e 

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

indices :: UA a => UArr a -> UArr IntSource

Return the indices of an array.

Array setup

createU :: UA e => forall s. Int -> (Int -> ST s e) -> ST s (UArr e)Source

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

createIO :: UA e => Int -> (Int -> IO e) -> IO (UArr e)Source

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