Expand description
Vecs indexing, ranking, sorting, merging, searching, reversing, intersecting, printing, etc.
Modules
Implementation of trait Indices for &[usize]
Implementation of trait Mutops for &mut[T]
Utilities for serializing, writing and printing (optionally in colours) generic vectors.
Implementation of trait Vecops for &[T]
Macros
Macro here!()
gives &str
with the file:line path::function-name
of where it was called from.
Structs
struct for minimum value, its index, maximum value, its index
Traits
Methods to manipulate indices of Vec<usize>
type.
Mutable Operators on &mut[T]
Trait to serialize slices of generic items &[T]
(vectors)
and slices of Vecs of generic items &[Vec<T>]
(matrices).
All are converted into printable strings and optionally coloured.
Also, methods to serialize and render the resulting string
in bold ANSI terminal colours.
Methods to manipulate generic Vecs and slices of type &[T]
Functions
General Binary Search
Search within the specified Rangecmpr
is comparing against a search item captured from its environment.
The sort order reflected by cmpr
can be either ascending or descending (increasing/decreasing).
When item is in order before range.start, empty range range.start..range.start is returned.
When item is in order after range.end-1, range.end..range.end is returned.
Normally binary_find returns Range of all the consecutive values
that are PartiallyEqual to the sought item.
When item is not found, then the returned range will be empty and
its start (and end) will be the sort position where the item can be inserted.
Generalised binary_search
for any one target.
Search within the specified Rangecmpr
is comparing against search target captured from its environment.
The sort order reflected by cmpr
can be either ascending or descending (increasing/decreasing).
When the target is in order before range.start, range.start is returned.
When the target is in order after range.end-1, range.end is returned.
Normally returns an index of the first hit target that is PartiallyEqual.
When the target is not present, then its insert position is returned.