Circle

Manifolds.Circle โ€” Type
Circle{๐”ฝ} <: AbstractManifold{๐”ฝ}

The circle ๐•Š1๐•Š^1 is a manifold here represented by real-valued points in [โˆ’ฯ€,ฯ€)[-ฯ€,ฯ€) or complex-valued points zโˆˆCz โˆˆ โ„‚ of absolute value โˆฃzโˆฃ=1\lvert z\rvert = 1.

Constructor

Circle(๐”ฝ=โ„)

Generate the โ„-valued Circle represented by angles, which alternatively can be set to use the AbstractNumbers ๐”ฝ=โ„‚ to obtain the circle represented by โ„‚-valued circle of unit numbers.

source
Base.exp โ€” Method
exp(M::Circle, p, X)

Compute the exponential map on the Circle.

expโกpX=(p+X)2ฯ€,\exp_p X = (p+X)_{2ฯ€},

where (โ‹…)2ฯ€(โ‹…)_{2ฯ€} is the (symmetric) remainder with respect to division by 2ฯ€2ฯ€, i.e. in [โˆ’ฯ€,ฯ€)[-ฯ€,ฯ€).

For the complex-valued case, the same formula as for the Sphere ๐•Š1๐•Š^1 is applied to values in the complex plane.

source
Base.log โ€” Method
log(M::Circle, p, q)

Compute the logarithmic map on the Circle M.

logโกpq=(qโˆ’p)2ฯ€,\log_p q = (q-p)_{2ฯ€},

where (โ‹…)2ฯ€(โ‹…)_{2ฯ€} is the (symmetric) remainder with respect to division by 2ฯ€2ฯ€, i.e. in [โˆ’ฯ€,ฯ€)[-ฯ€,ฯ€).

For the complex-valued case, the same formula as for the Sphere ๐•Š1๐•Š^1 is applied to values in the complex plane.

source
Base.rand โ€” Method
Random.rand(M::Circle{โ„}; vector_at = nothing, ฯƒ::Real=1.0)

If vector_at is nothing, return a random point on the Circle S1\mathbb S^1 by picking a random element from [โˆ’ฯ€,ฯ€)[-\pi,\pi) uniformly.

If vector_at is not nothing, return a random tangent vector from the tangent space of the point vector_at on the Circle by using a normal distribution with mean 0 and standard deviation ฯƒ.

source
Manifolds.complex_dot โ€” Method
complex_dot(a, b)

Compute the inner product of two (complex) numbers with in the complex plane.

source
Manifolds.sym_rem โ€” Method
sym_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 ฯ€ฯ€

source
ManifoldsBase.check_point โ€” Method
check_point(M::Circle, p)

Check whether p is a point on the Circle M. For the real-valued case, p is an angle and hence it checks that pโˆˆ[โˆ’ฯ€,ฯ€)p โˆˆ [-ฯ€,ฯ€). for the complex-valued case, it is a unit number, pโˆˆCp โˆˆ โ„‚ with โˆฃpโˆฃ=1\lvert p \rvert = 1.

source
ManifoldsBase.check_vector โ€” Method
check_vector(M::Circle, p, X; kwargs...)

Check whether X is a tangent vector in the tangent space of p on the Circle M. For the real-valued case represented by angles, all X are valid, since the tangent space is the whole real line. For the complex-valued case X has to lie on the line parallel to the tangent line at p in the complex plane, i.e. their inner product has to be zero.

source
ManifoldsBase.distance โ€” Method
distance(M::Circle, p, q)

Compute the distance on the Circle M, which is the absolute value of the symmetric remainder of p and q for the real-valued case and the angle between both complex numbers in the Gaussian plane for the complex-valued case.

source
ManifoldsBase.inner โ€” Method
inner(M::Circle, p, X, Y)

Compute the inner product of the two tangent vectors X,Y from the tangent plane at p on the Circle M using the restriction of the metric from the embedding, i.e.

gp(X,Y)=Xโˆ—Yg_p(X,Y) = X*Y

for the real case and

gp(X,Y)=YTXg_p(X,Y) = Y^\mathrm{T}X

for the complex case interpreting complex numbers in the Gaussian plane.

source
ManifoldsBase.parallel_transport_to โ€” Method
 parallel_transport_to(M::Circle, p, X, q)

Compute the parallel transport of X from the tangent space at p to the tangent space at q on the Circle M. For the real-valued case this results in the identity. For the complex-valued case, the formula is the same as for the Sphere(1) in the complex plane.

Pqโ†pX=Xโˆ’โŸจlogโกpq,XโŸฉpdC2(p,q)(logโกpq+logโกqp),\mathcal P_{qโ†p} X = X - \frac{โŸจ\log_p q,XโŸฉ_p}{d^2_{โ„‚}(p,q)} \bigl(\log_p q + \log_q p \bigr),

where log denotes the logarithmic map on M.

source
ManifoldsBase.project โ€” Method
project(M::Circle, p, X)

Project a value X onto the tangent space of the point p on the Circle M.

For the real-valued case this is just the identity. For the complex valued case X is projected onto the line in the complex plane that is parallel to the tangent to p on the unit circle and contains 0.

source
ManifoldsBase.project โ€” Method
project(M::Circle, p)

Project a point p onto the Circle M. For the real-valued case this is the remainder with respect to modulus 2ฯ€2ฯ€. For the complex-valued case the result is the projection of p onto the unit circle in the complex plane.

source
Statistics.mean โ€” Method
mean(M::Circle{โ„‚}, x::AbstractVector[, w::AbstractWeights])

Compute the Riemannian mean of x of points on the Circle ๐•Š1๐•Š^1, represented by complex numbers, i.e. embedded in the complex plane. Comuting the sum

s=โˆ‘i=1nxis = \sum_{i=1}^n x_i

the mean is the angle of the complex number ss, so represented in the complex plane as sโˆฃsโˆฃ\frac{s}{\lvert s \rvert}, whenever sโ‰ 0s \neq 0.

If the sum s=0s=0, the mean is not unique. For example for opposite points or equally spaced angles.

source
Statistics.mean โ€” Method
mean(M::Circle{โ„}, x::AbstractVector[, w::AbstractWeights])

Compute the Riemannian mean of x of points on the Circle ๐•Š1๐•Š^1, represented by real numbers, i.e. the angular mean

atanโก(โˆ‘i=1nwisinโก(xi),โˆ‘i=1nwisinโก(xi)).\operatorname{atan}\Bigl( \sum_{i=1}^n w_i\sin(x_i), \sum_{i=1}^n w_i\sin(x_i) \Bigr).

source