Skip to contents

Computes a inner products of functional data objects of class fdata.

Usage

inprod.fdata(fdata1, fdata2 = NULL, w = 1, ...)

Arguments

fdata1

Functional data 1 or curve 1. fdata1$data with dimension (n1 x m), where n1 is the number of curves and m are the points observed in each curve.

fdata2

Functional data 2 or curve 2. fdata2$data with dimension (n2 x m), where n2 is the number of curves and m are the points observed in each curve.

w

Vector of weights with length m, If w = 1 approximates the metric Lp by Simpson's rule. By default it uses w = 1

...

Further arguments passed to or from other methods.

Details

By default it uses weights w=1. $$ \left\langle fdata1,fdata2 \right\rangle=\frac{1}{\int_{a}^{b}w(x)dx} \int_{a}^{b} fdata1(x) * fdata2(x)w(x) dx $$ The observed points on each curve are equally spaced (by default) or not.

See also

See also inprod and norm.fdata

Author

Manuel Febrero-Bande, Manuel Oviedo de la Fuente manuel.oviedo@udc.es

Examples

if (FALSE) { # \dontrun{
x<-seq(0,2*pi,length=1001)
fx1<-sin(x)/sqrt(pi)
fx2<-cos(x)/sqrt(pi)
argv<-seq(0,2*pi,len=1001)
fdat0<-fdata(rep(0,len=1001),argv,range(argv))
fdat1<-fdata(fx1,x,range(x))
inprod.fdata(fdat1,fdat1)
inprod.fdata(fdat1,fdat1)
metric.lp(fdat1)
metric.lp(fdat1,fdat0)
norm.fdata(fdat1)
# The same
integrate(function(x){(abs(sin(x)/sqrt(pi))^2)},0,2*pi)
integrate(function(x){(abs(cos(x)/sqrt(pi))^2)},0,2*pi)
} # }