Skip to main content

functional_spatial

Function functional_spatial 

Source
pub fn functional_spatial(
    data_obj: &FdMatrix,
    data_ori: &FdMatrix,
    argvals: Option<&[f64]>,
    dim: Dim,
) -> Vec<f64>
Expand description

Compute Functional Spatial Depth (FSD), dispatching on Dim.

Uses the L2 norm with Simpson’s integration weights (matches R’s depth.FSD()). Dim::One uses argvals (or a uniform grid when None); Dim::Two treats each row as a flattened surface and always uses the uniform grid (matching the former functional_spatial_2d).

§Arguments

  • data_obj - Data to compute depth for (nobj x n_points)
  • data_ori - Reference data (nori x n_points)
  • argvals - Optional evaluation grid for Dim::One; None uses a uniform grid
  • dim - Dimensionality selector (Dim::One or Dim::Two)