Skip to content

Commit

Permalink
add tests and address review
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbaran committed Jan 9, 2025
1 parent e93c1de commit 6a8bbf5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/src/misc/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This page documents the internal types and methods of `Manifolds.jl`'s that migh

```@docs
Manifolds.eigen_safe
Manifolds.get_parameter_arg
Manifolds.isnormal
Manifolds.log_safe
Manifolds.log_safe!
Expand Down
12 changes: 12 additions & 0 deletions src/Manifolds.jl
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,18 @@ include("utils.jl")

include("manifold_fallbacks.jl")

"""
get_parameter_arg(M::AbstractManifold)
Get `parameter` argument of the constructor of manifold `M`.
Returns either `:field` or `:type`.
# See also
`get_parameter`, `TypeParameter`
"""
get_parameter_arg(::AbstractManifold)

"""
projected_distribution(M::AbstractManifold, d, [p=rand(d)])
Expand Down
2 changes: 2 additions & 0 deletions test/manifolds/cholesky_space.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ include("../header.jl")
test_vee_hat=false,
exp_log_atol_multiplier=8.0,
test_inplace=true,
test_rand_point=true,
test_rand_tvector=true,
)
end
@testset "Test Error cases in is_point and is_vector" begin
Expand Down
1 change: 1 addition & 0 deletions test/manifolds/symmetric_positive_definite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ include("../header.jl")
M = SymmetricPositiveDefinite(3; parameter=:field)
@test typeof(get_embedding(M)) === Euclidean{Tuple{Int,Int},ℝ}
@test repr(M) == "SymmetricPositiveDefinite(3; parameter=:field)"
@test Manifolds.get_parameter_arg(M) === :field
end

@testset "Curvature" begin
Expand Down

0 comments on commit 6a8bbf5

Please sign in to comment.