Specific manifold functions
This small section extends the functions available from ManifoldsBase.jl and Manifolds.jl, espcially a few random generators, that are simpler than the functions available.
ManifoldsBase.mid_point
— Methodmid_point(M, p, q, x)
Compute the mid point between p and q. If there is more than one mid point of (not neccessarily minimizing) geodesics (i.e. on the sphere), the one nearest to x is returned.
Manopt.reflect
— Methodreflect(M, p, x)
reflect the point x
from the manifold M
at point x
, i.e.
where exp and log denote the exponential and logarithmic map on M
.
Manopt.sym_rem
— Methodsym_rem(x,[T=π])
Compute symmetric remainder of x
with respect to the interall 2*T
, i.e. (x+T)%2T
, where the default for T
is $π$
Simplified random functions
While statistics are available in Manifolds.jl, the following functions provide default random points and vectors on manifolds.
Manopt.random_point
— Functionrandom_point(M::Rotations, :Gaussian [, σ=1.0])
return a random point p
on the manifold Rotations
by generating a (Gaussian) random orthogonal matrix with determinant $+1$. Let $QR = A$ be the QR decomposition of a random matrix $A$, then the formula reads $p = QD$ where $D$ is a diagonal matrix with the signs of the diagonal entries of $R$, i.e.
It can happen that the matrix gets -1 as a determinant. In this case, the first and second columns are swapped.
Manopt.random_point
— Functionrandom_point(M::Sphere, :Gaussian[, σ=1.0])
return a random point on the Sphere by projecting a normal distirbuted vector from within the embedding to the sphere.
Manopt.random_point
— Methodrandom_point(M::Circle, :Uniform)
return a random point on the Circle
$\mathbb S^1$ by picking a random element from $[-\pi,\pi)$ uniformly.
Manopt.random_point
— Methodrandom_point(M::Euclidean[,:Gaussian, σ::Float64=1.0])
generate a random point on the Euclidean
manifold M
, where the optional parameter determines the type of the entries of the resulting point on the Euclidean space d.
Manopt.random_point
— Methodrandom_point(M::ProductManifold, options...)
return a random point x
on Grassmannian
manifold M
by generating a random (Gaussian) matrix with standard deviation σ
in matching size, which is orthonormal.
Manopt.random_point
— Methodrandom_point(M::Manidold, s::Symbol, options...)
generate a random point using a noise model given by s
with its additional options
just passed on.
Manopt.random_point
— Methodrandom_point(M::Manidold)
generate a random point on a manifold. By default it uses random_point(M,:Gaussian)
.
Manopt.random_point
— Methodrandom_point(M::AbstractPowerManifold, options...)
generate a random point on the AbstractPowerManfold
M
given options
that are passed on.
Manopt.random_point
— Methodrandom_point(M::SymmetricPositiveDefinite, :Gaussian[, σ=1.0])
gerenate a random symmetric positive definite matrix on the SymmetricPositiveDefinite
manifold M
.
Manopt.random_point
— Methodrandom_point(M::Grassmannian, :Gaussian [, σ=1.0])
return a random point x
on Grassmannian
manifold M
by generating a random (Gaussian) matrix with standard deviation σ
in matching size, which is orthonormal.
Manopt.random_point
— Methodrandom_point(M::Stiefel, :Gaussian[, σ=1.0])
return a random (Gaussian) point x
on the Stiefel
manifold M
by generating a (Gaussian) matrix with standard deviation σ
and return the orthogonalized version, i.e. return the Q component of the QR decomposition of the random matrix of size $n×k$.
Manopt.random_tangent
— Functionrandom_tangent(M::Grassmann, p[,type=:Gaussian, σ=1.0])
return a (Gaussian) random vector from the tangent space $T_x\mathrm{Gr}(n,k)$ with mean zero and standard deviation σ
by projecting a random Matrix onto the x
.
Manopt.random_tangent
— Functionrandom_tangent(M::Sphere, p[, :Gaussian, σ=1.0])
return a random tangent vector in the tangent space of p
on the Sphere
M
.
Manopt.random_tangent
— Functionrandom_tangent(M, p[, :Gaussian, σ = 1.0])
generate a random tangent vector in the tangent space of the point p
on the SymmetricPositiveDefinite
manifold M
by using a Gaussian distribution with standard deviation σ
on an ONB of the tangent space.
Manopt.random_tangent
— Functionrandom_tangent(M::Rotations, p[, type=:Gaussian, σ=1.0])
return a random tangent vector in the tangent space $T_x\mathrm{SO}(n)$ of the point x
on the Rotations
manifold M
by generating a random skew-symmetric matrix. The function takes the real upper triangular matrix of a (Gaussian) random matrix $A$ with dimension $n\times n$ and subtracts its transposed matrix. Finally, the matrix is normalized.
Manopt.random_tangent
— Functionrandom_tangent(M::Circle, p [, :Gaussian, σ=1.0])
return a random tangent vector from the tangent space of the point p
on the Circle $\mathbb S^1$ by using a normal distribution with mean 0 and standard deviation 1.
Manopt.random_tangent
— Functionrandom_tangent(M::Hyperpolic, p, :Gaussian [, σ=1.0])
generate a random point on the Hyperbolic manifold by projecting a point from the embedding with respect to the Minkowsky metric.
Manopt.random_tangent
— Functionrandom_tangent(M::SymmetricPositiveDefinite, p, :Rician [,σ = 0.01])
generate a random tangent vector in the tangent space of p
on the SymmetricPositiveDefinite
manifold M
by using a Rician distribution with standard deviation σ
.
Manopt.random_tangent
— Methodrandom_tangent(M::ProductManifold, p)
generate a random tangent vector in the tangent space of the point p
on the ProductManifold
M
.
Manopt.random_tangent
— Methodrandom_tangent(M, p, options...)
generate a random tangent vector in the tangent space of p
on M
. By default this is a :Gaussian
distribution.