vector-algorithms-0.3.1: Efficient algorithms for vector arrays

PortabilityNon-portable (rank-2 types)
StabilityExperimental
MaintainerDan Doel <dan.doel@gmail.com>

Data.Vector.Algorithms.Combinators

Description

The purpose of this module is to supply various combinators for commonly used idioms for the algorithms in this package. Examples at the time of this writing include running an algorithm keyed on some function of the elements (but only computing said function once per element), and safely applying the algorithms on mutable arrays to immutable arrays.

Synopsis

Documentation

apply :: Vector v e => (forall s mv. MVector mv e => mv s e -> ST s ()) -> v e -> v eSource

Safely applies a mutable array algorithm to an immutable array.