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

Portabilityportable
Stabilityexperimental
Maintainerbos@serpentine.com

Statistics.Function

Contents

Description

Useful functions.

Synopsis

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

Arguments

:: (Vector v e, Ord e) 
=> Int

The 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.