statistics-0.5.1.2: 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 a vector in one pass.

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

Sort a vector.

partialSortSource

Arguments

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

The number k of least elements.

-> Vector e 
-> Vector e 

Partially sort a vector, such that the least k elements will be at the front.

indexed :: Unbox e => Vector e -> Vector (Int, e)Source

Zip a vector with its indices.

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

Return the indices of a vector.

Vector setup

create :: (PrimMonad m, Unbox e) => Int -> (Int -> m e) -> m (Vector e)Source

Create a vector, using the given action to populate each element.