Skip to main content

elastic_align_pair_multires

Function elastic_align_pair_multires 

Source
pub fn elastic_align_pair_multires(
    f1: &[f64],
    f2: &[f64],
    argvals: &[f64],
    config: &MultiresConfig,
) -> Result<AlignmentResult, FdarError>
Expand description

Align curve f2 to f1 using multi-resolution elastic alignment.

  1. Coarse stage: Subsample both SRSFs to a coarser grid, run DP, interpolate the resulting warp back to full resolution.
  2. Fine stage: Starting from the coarse warp, run gradient descent steps to locally refine the warp on the full-resolution grid.

For short curves (m < 2 * coarsen_factor), falls back to standard DP.

§Arguments

  • f1 — Target curve (length m)
  • f2 — Curve to align (length m)
  • argvals — Evaluation points (length m)
  • config — Multi-resolution configuration

§Errors

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