Testing
Documentation for testing utilities for Manifolds.jl. The function test_manifold can be used to verify that your manifold correctly implements the Manifolds.jl interface.
Manifolds.test_manifold — Functiontest_manifold(M::AbstractManifold, pts::AbstractVector; kwargs...)Test general properties of manifold M, given at least three different points that lie on it (contained in pts).
Arguments
basis_has_specialized_diagonalizing_get = false: if true, assumes thatDiagonalizingOrthonormalBasisgiven inbasis_typeshasget_coordinatesandget_vectorthat work without caching.basis_types_to_from = (): basis types that will be tested based onget_coordinatesandget_vector.basis_types_vecs = (): basis types that will be tested based onget_vectorsdefault_inverse_retraction_method = ManifoldsBase.LogarithmicInverseRetraction(): default method for inverse retractions (log.default_retraction_method = ManifoldsBase.ExponentialRetraction(): default method for retractions (exp).exp_log_atol_multiplier = 0: change absolute tolerance of exp/log tests (0 use default, i.e. deactivate atol and use rtol).exp_log_rtol_multiplier = 1: change the relative tolerance of exp/log tests (1 use default). This is deactivated if theexp_log_atol_multiplieris nonzero.expected_dimension_type = Integer: expected type of value returned bymanifold_dimension.inverse_retraction_methods = []: inverse retraction methods that will be tested.is_mutating = true: whether mutating variants of functions should be tested.is_point_atol_multiplier = 0: determines atol ofis_pointchecks.is_tangent_atol_multiplier = 0: determines atol ofis_vectorchecks.has_get_embedding = false: whether the manifold has a specializedget_embedding(M, p)method (to test mutatingembed!). This is experimental.mid_point12 = test_exp_log ? shortest_geodesic(M, pts[1], pts[2], 0.5) : nothing: if notnothing, then check thatmid_point(M, pts[1], pts[2])is approximately equal tomid_point12. This is by default set tonothingiftext_exp_logis set to false.point_distributions = []: point distributions to test.rand_tvector_atol_multiplier = 0: chage absolute tolerance in testing random vectors (0 use default, i.e. deactivate atol and use rtol) random tangent vectors are tangent vectors.retraction_atol_multiplier = 0: change absolute tolerance of (inverse) retraction tests (0 use default, i.e. deactivate atol and use rtol).retraction_rtol_multiplier = 1: change the relative tolerance of (inverse) retraction tests (1 use default). This is deactivated if theexp_log_atol_multiplieris nonzero.retraction_methods = []: retraction methods that will be tested.test_atlases = []: Vector or tuple of atlases that should be tested.test_exp_log = true: if true, check thatexpis the inverse oflog.test_injectivity_radius = true: whether implementation ofinjectivity_radiusshould be tested.test_inplace = false: if true check if inplace variants work if they are activated, e.g. check thatexp!(M, p, p, X)work iftest_exp_log = true. This in general requiresis_mutatingto be true.test_is_tangent: if true check that thedefault_inverse_retraction_methodactually returns valid tangent vectors.test_musical_isomorphisms = false: test musical isomorphisms.test_mutating_rand = false: test the mutating random function for points on manifolds.test_project_point = false: test projections onto the manifold.test_project_tangent = false: test projections on tangent spaces.test_representation_size = true: test representation size of points/tvectprs.test_tangent_vector_broadcasting = true: test boradcasting operators on TangentSpace.test_vector_spaces = true: test Vector bundle of this manifold.test_default_vector_transport = false: test the default vector transport (usually parallel transport).tvector_distributions = []: tangent vector distributions to test.vector_transport_methods = []: vector transport methods that should be tested.vector_transport_inverse_retractions = [default_inverse_retraction_method for _ in 1:length(vector_transport_methods)]` inverse retractions to use with the vector transport method (especially the differentiated ones)vector_transport_to = [ true for _ in 1:length(vector_transport_methods)]: whether to check thetovariant of vector transportvector_transport_direction = [ true for _ in 1:length(vector_transport_methods)]: whether to check thedirectionvariant of vector transport
Manifolds.find_eps — Functionfind_eps(x...)Find an appropriate tolerance for given points or tangent vectors, or their types.
Manifolds.test_parallel_transport — Functiontest_parallel_transport(M,P; to=true, direction=true)Generic tests for parallel transport on Mgiven at least two pointsin P.
The single functions to transport to (a point) or (in a) direction are sub-tests that can be activated by the keywords arguments