Module seq

Module seq 

Source
Expand description

Contains different traits for sequences of elements, namely seq::VectorView and seq::VectorFn. They all have some functional overlap with ExactSizeIterator, but differ in how they allow access to the elements of the sequence.

Modules§

permute
Contains the utility functions permute::permute() and permute::permute_inv() for applying permutations VectorViewMuts.
sparse
Contains sparse::SparseMapVector, a container for sparse vectors.
step_by
Contains step_by::StepBy and step_by::StepByFn, which wrap a VectorView or VectorFn, respectively, and give a new VectorView or VectorFn that only yields every n-th element.
subvector
Contains subvector::SubvectorView and subvector::SubvectorFn, which wrap a VectorView or VectorFn, respectively, and give a new VectorView or VectorFn that only yields elements from a given range.

Structs§

CloneElFn
A VectorFn that produces its elements by cloning the elements of an underlying VectorView. Produced by the functions VectorView::clone_els() and VectorView::clone_ring_els().
CloneRingEl
A wrapper around a RingStore that is callable with signature (&El<R>) -> El<R>, and will clone the given ring element when called.
CloneValue
Callable struct that wraps Clone::clone().
VectorFnIter
Iterator over the elements of a VectorFn. Produced by the function VectorFn::iter() and VectorFn::into_iter().
VectorFnMap
VectorViewFn
Wrapper around VectorView that interprets it as a VectorFn. The elements it provides are just the same references that would be returned through VectorFn::at(). Produced by the function VectorView::as_fn().
VectorViewMap
VectorViewMapMut

Traits§

SelfSubvectorFn
Trait for VectorFns that support shrinking, i.e. transforming the vector into a subvector of itself.
SelfSubvectorView
Trait for VectorViews that support shrinking, i.e. transforming the vector into a subvector of itself.
SparseVectorViewOperation
Operation that operates on a VectorViewSparse.
SwappableVectorViewMut
A trait for VectorViewMuts that support swapping of two elements.
VectorFn
A trait for objects that provides random-position access to a 1-dimensional sequence (or vector) of elements that returned by value.
VectorView
A trait for objects that provides random-position read access to a 1-dimensional sequence (or vector) of elements.
VectorViewMut
A trait for VectorViews that allow mutable access to one element at a time.
VectorViewSparse
View on a sequence type that stores its data in a sparse format. This clearly requires that the underlying type T has some notion of a “zero” element.