statistics-0.4.1: A library of statistical types, data, and functionsSource codeContentsIndex
Statistics.Function
Portabilityportable
Stabilityexperimental
Maintainerbos@serpentine.com
Contents
Array setup
Description
Useful functions.
Synopsis
minMax :: UArr Double -> Double :*: Double
sort :: (UA e, Ord e) => UArr e -> UArr e
partialSort :: (UA e, Ord e) => Int -> UArr e -> UArr e
indices :: UA a => UArr a -> UArr Int
createU :: UA e => forall s. Int -> (Int -> ST s e) -> ST s (UArr e)
createIO :: UA e => Int -> (Int -> IO e) -> IO (UArr e)
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
:: (UA e, Ord e)
=> IntThe 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.
Produced by Haddock version 2.4.2