relocate | R Documentation |
Changes the reference point for tangent space representations on a Riemannian manifold.
relocate(old_ref, new_ref, images, met)
old_ref |
A reference point on the manifold to be replaced. Must be an object of class |
new_ref |
The new reference point on the manifold. Must be an object of class |
images |
A list of tangent representations relative to the old reference point. Each element in the list must be an object of class |
met |
A metric object of class |
A list of tangent representations relative to the new reference point. Each element in the returned list will be an object of class dspMatrix
.
if (requireNamespace("Matrix", quietly = TRUE)) {
library(Matrix)
data(airm)
old_ref <- diag(2) |>
Matrix::nearPD() |>
_$mat |>
Matrix::pack()
new_ref <- diag(c(2, 3)) |>
Matrix::nearPD() |>
_$mat |>
Matrix::pack()
images <- list(
diag(2) |> Matrix::symmpart() |> Matrix::pack(),
diag(c(1, 0.5)) |> Matrix::symmpart() |> Matrix::pack()
)
relocate(old_ref, new_ref, images, airm)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.