Skip to main content

norm_lp

Function norm_lp 

Source
pub fn norm_lp(data: &FdMatrix, argvals: &[f64], p: f64, dim: Dim) -> Vec<f64>
Expand description

Compute Lp norm for each sample via a unified Dim dispatch.

The 2D path never diverged from the 1D one, so both Dim arms forward to [norm_lp_1d]. The dim argument makes caller intent explicit and provides a single future seam should a real 2D specialization ever be needed.

ยงArguments

  • data - Functional data matrix (n x m)
  • argvals - Evaluation points for integration
  • p - Order of the norm (e.g., 2.0 for L2)
  • dim - Dimensionality selector (Dim::One or Dim::Two)