Skip to contents

Exponential map of \(Gr(n, k)\) at base point \(U_0\), the inverse of log_map_grassmann on the cut domain. Each row of V holds tangent coordinates as.vector(B), with B of size (n - k) x k; the horizontal lift is \(\Delta = U_\perp B\) and, writing its compact singular value decomposition \(\Delta = Q \Sigma R^T\), the point is \(U_0 R \cos(\Sigma) R^T + Q \sin(\Sigma) R^T\). Useful to simulate data on \(Gr(n, k)\).

Usage

exp_map_grassmann(V, p, n = nrow(p), k = ncol(p))

Arguments

V

Numeric matrix with (n - k) * k columns: tangent-space coordinates at p, one row per point.

p

The base point: an n x k matrix with orthonormal columns, or a vector of length n * k (then n and k must be given).

n, k

Integers: dimensions of \(Gr(n, k)\). Default to the dimensions of p when it is a matrix.

Value

A numeric matrix with nrow(V) rows and n * k columns: Stiefel representatives as.vector(U) of the points.

Examples

X <- exp_map_grassmann(matrix(rnorm(40, sd = 0.3), nrow = 10), diag(4)[, 1:2])
is_in_grassmann(X, n = 4, k = 2)
#> [1] TRUE