rbase.curvedist {RiemBase} | R Documentation |
Distance between Two Curves with Finite Difference Approximation
Description
Suppose we have to two curves f,g:I\subset \mathbf{R} \rightarrow \mathcal{M}
evaluated at finite locations t_0 \le \ldots \le t_N
,
rbase.curvedist
computes distance between two curves f
and g
using finite difference approximation with trapezoidal rule.
In order to induce no interpolation, two curves should be of same length.
Usage
rbase.curvedist(curve1, curve2, t = NULL, type = c("intrinsic", "extrinsic"))
Arguments
curve1 |
a S3 object of |
curve2 |
a S3 object of |
t |
a length- |
type |
type of Riemannian distance ( |
Value
computed distance.
Examples
## Not run:
### Generate two sets of 10 2-frames in R^4 : as grassmann points
ndata = 10
data1 = array(0,c(4,2,ndata))
data2 = array(0,c(4,2,ndata))
for (i in 1:ndata){
tgt = matrix(rnorm(4*4),nrow=4)
data1[,,i] = qr.Q(qr(tgt))[,1:2]
}
for (i in 1:ndata){
tgt = matrix(rnorm(4*5, sd=2),nrow=4)
data2[,,i] = qr.Q(qr(tgt))[,1:2]
}
gdata1 = riemfactory(data1, name="grassmann") # wrap as 'riemdata' class.
gdata2 = riemfactory(data2, name="grassmann")
rbase.curvedist(gdata1, gdata2)
## End(Not run)
[Package RiemBase version 0.2.5 Index]