diff --git a/test/runtests.jl b/test/runtests.jl index ee3aa40..614b065 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -16,5 +16,6 @@ include("testPartialProductSE2.jl") include("basic_se3.jl") include("testSymmetry.jl") include("testUpdateMKD.jl") +include("testMKDStats.jl") # diff --git a/test/testMKDStats.jl b/test/testMKDStats.jl new file mode 100644 index 0000000..5bc2cda --- /dev/null +++ b/test/testMKDStats.jl @@ -0,0 +1,21 @@ +using Test +using ApproxManifoldProducts +using Manifolds + +@testset "Test basic MKD statistics" begin + + +M = SpecialEuclidean(2) +u0 = ArrayPartition(zeros(2),[1 0; 0 1.0]) +ϵ = identity_element(M, u0) + +pts = [exp(M, ϵ, hat(M, ϵ, [0.05*randn(2);0.75*randn()])) for i in 1:N] + +P = manikde!(M, pts) + +@test isapprox(M, mean(P), mean(M, pts)) +@test isapprox(var(P), var(M, pts)) +@test isapprox(std(P), std(M, pts)) +@test isapprox(cov(P), cov(M, pts)) + +end