getMetricTensor: Metric tensor of a space or basis

View source: R/Bayes_spaces.R

getMetricTensorR Documentation

Metric tensor of a space or basis

Description

The metric tensor is the Gram matrix ‘S', used in '|v|^2 = v’ S v' to compute the metric of the space when 'v' is the vector of basis coefficients. 'S' contains the scalar products of the basis elements, 'S[i,j] = <psi_i, psi_j>'.

Usage

getMetricTensor(x, ...)

Arguments

x

the space or basis for which the metric tensor shall be returned.

...

further generic parameters for the computation

Details

For an orthonormal basis 'S' is the identity matrix. The default zero-integral B-spline (ZB-spline) basis is **not** orthonormal, so 'S' is a banded, non-identity matrix; inner products ([scalarProduct]), norms ([norm.BData]), metric variance ([mvar][mvar.BData]) and PCA ([princomp.BData]) all rely on it. You can check whether a basis is orthonormal by comparing the result to 'diag(nrow(S))'.

Value

A symmetric positive-definite matrix 'S' (the Gram matrix / metric tensor), with 'S[i,j]' the inner product of basis elements 'i' and 'j'.

See Also

[BayesSpaceBasis], [scalarProduct], [princomp.BData]

Examples

getMetricTensor(B2Unif01Basis5)   # not the identity: ZB-splines are not orthonormal


DistributionalDDA documentation built on Oct. 20, 2026, 5:06 p.m.