|
1 | | -using Manifolds, Manopt, Test |
| 1 | +using Manifolds, Manopt, RecursiveArrayTools, Test |
2 | 2 |
|
3 | 3 | @testset "Nonlinear lest squares plan" begin |
4 | 4 | @testset "Test cost/residual/jacobian cases" begin |
@@ -187,13 +187,21 @@ using Manifolds, Manopt, Test |
187 | 187 | @test isapprox(V, get_residuals(M, dnlso, p)) |
188 | 188 | end |
189 | 189 | end |
190 | | - @testset "Dummy decorator pass through" begin |
| 190 | + @testset "Add_vector! on special manifolds" begin |
191 | 191 | M = Hyperrectangle([0.0, 0.0], [1.0, 1.0]) |
192 | 192 | p = [0.5, 0.5] |
193 | 193 | X = [0.0, 0.0] |
194 | 194 | c = [0.1, 0.1] |
195 | 195 | Manopt.add_vector!(M, X, p, c, DefaultOrthonormalBasis()) |
196 | 196 | @test X == c |
| 197 | + M2 = Euclidean(2) |
| 198 | + M3 = M2 × M2 |
| 199 | + p3 = ArrayPartition([1.0, 0.0], [0.0, 1.0]) |
| 200 | + X3 = ArrayPartition([0.0, 0.0], [0.0, 0.0]) |
| 201 | + c3 = [1.0, 2.0, 3.0, 4.0] |
| 202 | + Manopt.add_vector!(M3, X3, p3, c3, DefaultOrthonormalBasis()) |
| 203 | + @test X3[M3, 1] == c3[1:2] |
| 204 | + @test X3[M3, 2] == c3[3:4] |
197 | 205 | end |
198 | 206 | @testset "Test Change of basis" begin |
199 | 207 | J = ones(2, 2) |
|
0 commit comments