pub fn make_index<TOA>(
    categories: Vec<TOA>,
    null: TOA
) -> Fallible<Transformation<VectorDomain<AtomDomain<usize>>, VectorDomain<AtomDomain<TOA>>, SymmetricDistance, SymmetricDistance>>where
    TOA: Primitive,
Expand description

Make a transformation that treats each element as an index into a vector of categories.

Arguments

  • categories - The set of categories to index into.
  • null - Category to return if the index is out-of-range of the category set.

Generics

  • TOA - Atomic Output Type. Output data will be Vec<TOA>.