Crate indxvec

source ·
Expand description

Vecs searching, indexing, ranking, sorting, merging, 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 Search for Range
  • 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

  • Binary search algoritms implemented on RangeInclusive
  • Methods to manipulate indices of Vec<usize> type.
  • Mutable Operators on &mut[T]
  • Trait to serialize tuples &(T,T) and &(T,T,T) and slices &[T], &[&[T]], &[Vec<T>]. Suitable for printing or writing to files pairs, triplets, all kinds of Vecs and slices and irregularly shaped 2D matrices.
    All are converted into Strings and optionally decorated and coloured. Included are methods and constants to render the resulting String in six primary bold ANSI terminal colours.
  • Lower level binary search algoritms implemented on RangeInclusive
  • Methods to manipulate generic Vecs and slices of type &[T]

Functions

  • General comparison that unlike cmp method in trait core::cmp::Ordering does not require onerous trait bounds, namely T to be Ord, Iterator, etc.