pub fn make_find_bin<TIA>(
    edges: Vec<TIA>
) -> Fallible<Transformation<VectorDomain<AtomDomain<TIA>>, VectorDomain<AtomDomain<usize>>, SymmetricDistance, SymmetricDistance>>where
    TIA: Number,
Expand description

Make a transformation that finds the bin index in a monotonically increasing vector of edges.

For each value in the input vector, finds the index of the bin the value falls into. edges splits the entire range of TIA into bins. The first bin at index zero ranges from negative infinity to the first edge, non-inclusive. The last bin at index edges.len() ranges from the last bin, inclusive, to positive infinity.

To be valid, edges must be unique and ordered. edges are left inclusive, right exclusive.

Arguments

  • edges - The set of edges to split bins by.

Generics

  • TIA - Atomic Input Type that is numeric