pub fn make_resize<TA, MI, MO>(
    input_domain: VectorDomain<AtomDomain<TA>>,
    input_metric: MI,
    size: usize,
    constant: TA
) -> Fallible<Transformation<VectorDomain<AtomDomain<TA>>, VectorDomain<AtomDomain<TA>>, MI, MO>>
where TA: 'static + Clone + CheckAtom, MI: IsMetricOrdered<Distance = IntDistance>, MO: IsMetricOrdered<Distance = IntDistance>, (VectorDomain<AtomDomain<TA>>, MI): MetricSpace, (VectorDomain<AtomDomain<TA>>, MO): MetricSpace,
Expand description

Make a Transformation that either truncates or imputes records with constant to match a provided size.

Arguments

  • input_domain - Domain of input data.
  • input_metric - Metric of input data.
  • size - Number of records in output data.
  • constant - Value to impute with.

Generics

  • TA - Atomic Type.
  • MI - Input Metric. One of InsertDeleteDistance or SymmetricDistance
  • MO - Output Metric. One of InsertDeleteDistance or SymmetricDistance

Returns

A vector of the same type TA, but with the provided size.