Skip to content

Commit

Permalink
add a test that power of product works fine.
Browse files Browse the repository at this point in the history
  • Loading branch information
kellertuer committed Aug 11, 2024
1 parent 1731f91 commit 07716e7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/power.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ using ManifoldsBase:
using StaticArrays
using LinearAlgebra
using Random
using RecursiveArrayTools

s = @__DIR__
!(s in LOAD_PATH) && (push!(LOAD_PATH, s))
Expand Down Expand Up @@ -472,4 +473,16 @@ end
fill!(P2, p, NAR)
@test P2 == [1.0 1.0; 2.0 2.0; 3.0 3.0]
end

@testset "get vectors on Power of product" begin
N = ManifoldsBase.DefaultManifold(1) × ManifoldsBase.DefaultManifold(1)
M = PowerManifold(N, NestedPowerRepresentation(), 2)
p = [ArrayPartition([1.0], [2.0]), ArrayPartition([3.0], [4.0])]
B = get_basis(M, p, DefaultOrthonormalBasis())
V = get_vectors(M, p, B)
for v in V
@test is_vector(M, p, v)
@test norm(M, p, v) == 1
end
end
end

0 comments on commit 07716e7

Please sign in to comment.