Computes the Lp distance between functional data objects using
numerical integration (Simpson's rule). Works with both regular fdata
and irregular irregFdata objects.
Usage
# S3 method for class 'irregFdata'
metric.lp(x, p = 2, ...)
metric.lp(x, ...)
# S3 method for class 'fdata'
metric.lp(x, y = NULL, p = 2, w = 1, ...)Arguments
- x
A functional data object (
fdataorirregFdata).- p
The order of the Lp metric (default 2 for L2 distance).
- ...
Additional arguments passed to methods.
- y
An object of class 'fdata'. If NULL, computes self-distances for x (more efficient symmetric computation). Only supported for
fdata.- w
Optional weight vector of length equal to number of evaluation points. Default is uniform weighting. Only supported for
fdata.