pub fn then_index<M, TOA>(
    categories: Vec<TOA>,
    null: TOA
) -> PartialTransformation<VectorDomain<AtomDomain<usize>>, VectorDomain<AtomDomain<TOA>>, M, M>
Expand description

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

Arguments

  • input_domain - The domain of the input vector.
  • input_metric - The metric of the input vector.
  • categories - The set of categories to index into.
  • null - Category to return if the index is out-of-range of the category set.

Generics

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