Torus
The torus $๐^d โ
[-ฯ,ฯ)^d$ is modeled as an AbstractPowerManifold of the (real-valued) Circle and uses ArrayPowerRepresentation. Points on the torus are hence row vectors, $x โ โ^{d}$.
Example
The following code can be used to make a three-dimensional torus $๐^3$ and compute a tangent vector:
using Manifolds
M = Torus(3)
p = [0.5, 0.0, 0.0]
q = [0.0, 0.5, 1.0]
X = log(M, p, q)3-element Array{Float64,1}:
-0.5
0.5
1.0Types and functions
Most functions are directly implemented for an AbstractPowerManifold with ArrayPowerRepresentation except the following special cases:
Manifolds.Torus โ TypeTorus{N} <: AbstractPowerManifoldThe n-dimensional torus is the $n$-dimensional product of the Circle.
The Circle is stored internally within M.manifold, such that all functions of AbstractPowerManifold can be used directly.
ManifoldsBase.check_manifold_point โ Methodcheck_manifold_point(M::Torus{n},p)Checks whether p is a valid point on the Torus M, i.e. each of its entries is a valid point on the Circle and the length of x is n.
ManifoldsBase.check_tangent_vector โ Methodcheck_tangent_vector(M::Torus{n}, p, X; check_base_point = true, kwargs...)Checks whether X is a valid tangent vector to p on the Torus M. This means, that p is valid, that X is of correct dimension and elementwise a tangent vector to the elements of p on the Circle. The optional parameter check_base_point indicates, whether to call check_manifold_point for p.