Computes a inner products of functional data objects of class fdata.
Arguments
- fdata1
Functional data 1 or curve 1.
fdata1$data
with dimension (n1
xm
), wheren1
is the number of curves andm
are the points observed in each curve.- fdata2
Functional data 2 or curve 2.
fdata2$data
with dimension (n2
xm
), wheren2
is the number of curves andm
are the points observed in each curve.- w
Vector of weights with length
m
, Ifw
= 1 approximates the metric Lp by Simpson's rule. By default it usesw
= 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)
} # }