Manopt.Test
Manopt.Test — Module
Manopt.TestThe module Manopt.Test provides dummy types and small test problems and examples that can be used throughout testing.
Some of these are simplified variants of problems from ManoptExamples.jl that are added here to not introduce a circular dependency.
Some of the functionality is only populated when certain packages are loaded, that is
Test.jlManifolds.jl
For now this module mainly provides simplified variants of a few problems from ManoptExamples.jl and a few dummy types.
Manopt.Test.mean_task — Function
f, grad_f = Manopt.Test.mean_task(M, data)Returns cost and gradient for computing the mean of data $d_i$ on manifold M
\[\begin{align*} f(p) = \frac{1}{2n} \sum_{i=1}^n d_M(p, d_i)^2\\ \operatorname{grad} f(p) = -\frac{1}{n} \sum_{i=1}^n \log_p(d_i) \end{align*}\]
Manopt.Test.Circle_mean_task — Function
M, f, grad_f, p0, p_star = Circle_mean_task()Create a small mean problem on the circle to test Number-based algorithms. Requires Manifolds.jl to be loaded; use Manopt.Test.mean_task(M, data) for the general case.
Manopt.Test.ball_projection — Function
project_C, project_C! = ball_projection(M::AbstractManifold, c, r)Return the projection onto the geodesic ball of radius r around c on M, allocating and in place.
Manopt.Test.distance_task — Function
f, ∂f, ∂f! = distance_task(M::AbstractManifold, q)Return the distance to q on M and a subgradient of it, allocating and in place.