From 07716e781d8bb2b7471804eb49f3b1f5a5ddbe7c Mon Sep 17 00:00:00 2001 From: Ronny Bergmann Date: Sun, 11 Aug 2024 15:47:17 +0200 Subject: [PATCH] add a test that power of product works fine. --- test/power.jl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/power.jl b/test/power.jl index c21f644f..ab69e05c 100644 --- a/test/power.jl +++ b/test/power.jl @@ -10,6 +10,7 @@ using ManifoldsBase: using StaticArrays using LinearAlgebra using Random +using RecursiveArrayTools s = @__DIR__ !(s in LOAD_PATH) && (push!(LOAD_PATH, s)) @@ -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