Vector
Type Classes
Methods
sizeOf :: (proxy a) -> Int
alignment :: (proxy a) -> Int
Functions
O(1). Empty vector.
O(1). Single element vector.
O(n). Replicate element n times.
O(n). Generate using index function.
O(n). Iterate function n times.
O(n). Monadic replicate.
O(n). Monadic generate.
O(n). Convert list to vector.
O(n). Convert list with known length.
O(1). Length of vector.
O(1). Test for empty.
O(1). Last element (unsafe).
O(1). Unsafe index.
O(1). Unsafe head.
O(1). Unsafe last.
O(1). Slice from offset with length (view).
O(1). All but last element (view).
O(1). All but first element (view).
O(1). First n elements (view).
O(1). Drop first n elements (view).
O(1). Split at position.
O(n). Prepend element.
O(n). Append element.
O(n). Append vectors.
O(n). Concatenate vectors.
O(n). Force evaluation and compaction.
O(n). Map function over elements.
O(n). Map with index.
O(n). Map and concatenate.
O(n). Monadic map.
O(n). Monadic map, discarding results.
O(n). Flipped monadic map.
O(n). Flipped monadic map, discarding results.
O(n). Zip with function.
O(n). Zip three vectors.
zipWith4 :: (a -> b -> c -> d -> e) -> (Vector a) -> (Vector b) -> (Vector c) -> (Vector d) -> Vector e
#
O(n). Zip four vectors.
O(n). Monadic zipWith.
O(n). Monadic zipWith, discarding results.
O(n). Zip to pairs.
O(n). Zip three vectors.
O(n). Zip four vectors.
O(n). Unzip pairs.
O(n). Unzip triples.
O(n). Unzip quadruples.
O(n). Filter by predicate.
O(n). Filter with index.
O(n). Monadic filter.
O(n). Take while predicate holds.
O(n). Drop while predicate holds.
O(n). Partition by predicate.
O(n). Span while predicate holds.
O(n). Break at first failure.
O(n). Test membership.
O(n). Test non-membership.
O(n). Find first match.
O(n). Find index of first match.
O(n). Find all matching indices.
O(n). Find index of element.
O(n). Find all indices of element.
O(n). Left fold.
O(n). Strict left fold.
O(n). Left fold without starting value.
O(n). Strict left fold without starting value.
O(n). Right fold.
O(n). Strict right fold.
O(n). Right fold without starting value.
O(n). Strict right fold without starting value.
O(n). Indexed left fold.
O(n). Strict indexed left fold.
O(n). Indexed right fold.
O(n). Strict indexed right fold.
O(n). All elements satisfy predicate.
O(n). Any element satisfies predicate.
O(n). Sum of elements.
O(n). Product of elements.
O(n). Maximum element.
O(n). Minimum element.
O(n). Maximum by comparison function.
O(n). Minimum by comparison function.
O(n). Index of maximum element.
O(n). Index of minimum element.
O(n). Prefix scan (exclusive).
O(n). Strict prefix scan (exclusive).
O(n). Suffix scan (exclusive).
O(n). Strict suffix scan (exclusive).
O(n). Left scan (inclusive).
O(n). Strict left scan (inclusive).
O(n). Left scan without starting value.
O(n). Strict left scan without starting value.
O(n). Right prefix scan.
O(n). Strict right prefix scan.
O(n). Right suffix scan.
O(n). Strict right suffix scan.
O(n). Right scan (inclusive).
O(n). Strict right scan (inclusive).
O(n). Right scan without starting value.
O(n). Strict right scan without starting value.
O(n). Convert to list.
O(n). Convert between vector types.
O(n). Allocate new mutable vector.
O(n). Allocate with initial value.
O(1). Read element.
O(1). Write element.
O(1). Modify element.
O(1). Swap two elements.
O(n). Grow vector capacity.
O(n). Freeze mutable to immutable.
O(n). Thaw immutable to mutable.
O(n). Copy between mutable vectors.
O(1). Unsafe freeze (no copy).
O(1). Unsafe thaw (no copy).
O(n log n). Sort elements.
O(n log n). Sort by comparison function.
O(n log n). Sort by key extraction.