Skip to content

Commit

Permalink
test MKD stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Affie committed Dec 11, 2022
1 parent 93fa19e commit 25db7a6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ include("testPartialProductSE2.jl")
include("basic_se3.jl")
include("testSymmetry.jl")
include("testUpdateMKD.jl")
include("testMKDStats.jl")

#
21 changes: 21 additions & 0 deletions test/testMKDStats.jl
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 25db7a6

Please sign in to comment.