Skip to content

Commit

Permalink
cut some redundant tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbaran committed Oct 22, 2023
1 parent 0d38cf3 commit 2cc48b8
Showing 1 changed file with 0 additions and 85 deletions.
85 changes: 0 additions & 85 deletions test/manifolds/power_manifold.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,8 @@ end
@test Ms^(5,) === Ms1
@test Mr^(5, 7) === Mr2

types_s1 = [Array{Float64,2}, HybridArray{Tuple{3,Dynamic()},Float64,2}]
types_s2 = [Array{Float64,3}, HybridArray{Tuple{3,Dynamic(),Dynamic()},Float64,3}]

types_r1 = [Array{Float64,3}, HybridArray{Tuple{3,3,Dynamic()},Float64,3}]

types_rn1 = [Vector{Matrix{Float64}}]
TEST_STATIC_SIZED && push!(types_rn1, Vector{MMatrix{3,3,Float64,9}})

Expand Down Expand Up @@ -173,45 +170,6 @@ end
trim(s::String) = s[1:min(length(s), 20)]

basis_types = (DefaultOrthonormalBasis(), ProjectedOrthonormalBasis(:svd))
for T in types_s1
@testset "Type $(trim(string(T)))..." begin
pts1 = [convert(T, rand(power_s1_pt_dist)) for _ in 1:3]
@test injectivity_radius(Ms1, pts1[1]) == π
basis_diag = get_basis(
Ms1,
pts1[1],
DiagonalizingOrthonormalBasis(log(Ms1, pts1[1], pts1[2])),
)
basis_arb = get_basis(Ms1, pts1[1], DefaultOrthonormalBasis())
test_manifold(
Ms1,
pts1;
test_musical_isomorphisms=true,
test_injectivity_radius=false,
test_default_vector_transport=true,
test_project_point=true,
test_project_tangent=true,
vector_transport_methods=[
ParallelTransport(),
SchildsLadderTransport(),
PoleLadderTransport(),
],
test_vee_hat=true,
retraction_methods=retraction_methods,
inverse_retraction_methods=inverse_retraction_methods,
point_distributions=[power_s1_pt_dist],
tvector_distributions=[power_s1_tv_dist],
basis_types_to_from=(basis_diag, basis_arb, basis_types...),
rand_tvector_atol_multiplier=600.0,
retraction_atol_multiplier=12.0,
is_tangent_atol_multiplier=500.0,
exp_log_atol_multiplier=20 * prod(power_dimensions(Ms1)),
test_inplace=true,
test_rand_point=true,
test_rand_tvector=true,
)
end
end
for T in types_s2
@testset "Type $(trim(string(T)))..." begin
pts2 = [convert(T, rand(power_s2_pt_dist)) for _ in 1:3]
Expand All @@ -234,29 +192,6 @@ end
end
end

for T in types_r1
@testset "Type $(trim(string(T)))..." begin
pts1 = [convert(T, rand(power_r1_pt_dist)) for _ in 1:3]
test_manifold(
Mr1,
pts1;
test_injectivity_radius=false,
test_musical_isomorphisms=true,
test_vee_hat=true,
retraction_methods=retraction_methods,
inverse_retraction_methods=inverse_retraction_methods,
point_distributions=[power_r1_pt_dist],
tvector_distributions=[power_r1_tv_dist],
basis_types_to_from=basis_types,
rand_tvector_atol_multiplier=8.0,
retraction_atol_multiplier=12,
is_tangent_atol_multiplier=12.0,
exp_log_atol_multiplier=2e2 * prod(power_dimensions(Mr2)),
test_inplace=true,
)
end
end

for T in types_rn1
@testset "Type $(trim(string(T)))..." begin
pts1 = [convert(T, rand(power_rn1_pt_dist)) for _ in 1:3]
Expand Down Expand Up @@ -364,26 +299,6 @@ end
"""
end

@testset "Power manifold of Circle" begin
pts_t = [[0.0, 1.0, 2.0], [1.0, 1.0, 2.4], [0.0, 2.0, 1.0]]
MT = PowerManifold(Circle(), 3)
@test representation_size(MT) == (3,)
@test pts_t[1][MT, 2] == 1.0
@test HybridVector{3}(pts_t[1])[MT, 2] == 1.0
test_manifold(
MT,
pts_t;
test_injectivity_radius=false,
test_musical_isomorphisms=true,
retraction_methods=retraction_methods,
inverse_retraction_methods=inverse_retraction_methods,
rand_tvector_atol_multiplier=5.0,
retraction_atol_multiplier=12,
is_tangent_atol_multiplier=12.0,
test_inplace=true,
)
end

@testset "Atlas & Induced Basis" begin
M = PowerManifold(Euclidean(2), NestedPowerRepresentation(), 2)
p = [zeros(2), ones(2)]
Expand Down

0 comments on commit 2cc48b8

Please sign in to comment.