@@ -191,14 +191,12 @@ for N in [Float64, Float32, Rational{Int}]
191
191
# affine_map
192
192
@test_throws DimensionMismatch affine_map (ones (N, 2 , 3 ), U, N[1 , 1 ])
193
193
@test_throws DimensionMismatch affine_map (ones (N, 2 , 2 ), U, N[1 ])
194
- @static if isdefined (@__MODULE__ , :Polyhedra ) && isdefined (@__MODULE__ , :CDDLib )
195
- # TODO this should work, even without Polyhedra
196
- @test_broken affine_map (ones (N, 2 , 2 ), U, N[1 , 1 ])
197
- # U2 = affine_map(ones(N, 2, 2), U, N[1, 1])
198
- # @test isidentical(U, U2)
199
- # U2 = affine_map(ones(N, 3, 2), U, N[1, 1, 3])
200
- # @test isidentical(U3, U2)
201
- end
194
+ U2 = affine_map (ones (N, 2 , 2 ), U, N[1 , 1 ])
195
+ @test isidentical (U, U2)
196
+ X = affine_map (N[1 2 ; 0 0 ], U, N[1 , 1 ])
197
+ @test X isa HPolyhedron{N} && isequivalent (X, Hyperplane (N[0 , 1 ], N (1 )))
198
+ U2 = affine_map (ones (N, 3 , 2 ), U, N[1 , 1 , 3 ])
199
+ @test isidentical (U3, U2)
202
200
203
201
# distance (between point and set)
204
202
@test_throws DimensionMismatch distance (U, N[0 ])
@@ -228,16 +226,14 @@ for N in [Float64, Float32, Rational{Int}]
228
226
229
227
# linear_map
230
228
@test_throws DimensionMismatch linear_map (ones (N, 2 , 3 ), U)
231
- @static if isdefined (@__MODULE__ , :Polyhedra ) && isdefined (@__MODULE__ , :CDDLib )
232
- # TODO this should work, even without Polyhedra
233
- @test_broken linear_map (ones (N, 2 , 2 ), U)
234
- # U2 = linear_map(ones(N, 2, 2), U)
235
- # @test_broken isidentical(U, U2)
236
- @test_broken linear_map (ones (N, 3 , 2 ), U)
237
- # U2 = linear_map(ones(N, 3, 2), U)
238
- # @test U2 isa HPolyhedron{N} # TODO this should change
239
- # @test_broken isidentical(U3, U2)
240
- end
229
+ U2 = linear_map (ones (N, 2 , 2 ), U)
230
+ @test isidentical (U, U2)
231
+ U2 = linear_map (ones (N, 3 , 2 ), U)
232
+ @test isidentical (U3, U2)
233
+ P = linear_map (N[1 0 ; 0 0 ], U)
234
+ @test P isa HPolyhedron{N} && isequivalent (P, Hyperplane (N[0 , 1 ], N (0 )))
235
+ P = linear_map (N[0 0 ; 0 0 ; 0 0 ], U)
236
+ @test P isa HPolyhedron{N} && isequivalent (P, ZeroSet {N} (3 ))
241
237
242
238
# linear_map_inverse
243
239
U2 = LazySets. linear_map_inverse (ones (N, 2 , 3 ), U)
@@ -461,5 +457,5 @@ for N in [Float64, Float32]
461
457
462
458
# exponential_map
463
459
U2 = exponential_map (ones (N, 2 , 2 ), U)
464
- @test_broken isidentical (U, U2) # TODO this should change
460
+ @test isidentical (U, U2)
465
461
end
0 commit comments