Skip to main content

shape_distance

Function shape_distance 

Source
pub fn shape_distance(
    f1: &[f64],
    f2: &[f64],
    argvals: &[f64],
    quotient: ShapeQuotient,
    lambda: f64,
) -> Result<ShapeDistanceResult, FdarError>
Expand description

Compute the elastic shape distance between two curves.

Pre-processes both curves according to the quotient type, then computes the elastic distance after optimal alignment.

§Arguments

  • f1 — First curve (length m).
  • f2 — Second curve (length m).
  • argvals — Evaluation points (length m).
  • quotient — Which transformations to factor out.
  • lambda — Roughness penalty for alignment.

§Errors

Returns FdarError::InvalidDimension if lengths do not match or m < 2.