comparison test/Grids/manifolds_test.jl @ 1582:d9d767980d6f feature/grids/manifolds

Export ParameterSpace
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 26 Apr 2024 22:19:02 +0200
parents f77c5309dd2b
children 03894fd7b132
comparison
equal deleted inserted replaced
1581:f77c5309dd2b 1582:d9d767980d6f
10 @test ndims(HyperBox([1,1], [2,2])) == 2 10 @test ndims(HyperBox([1,1], [2,2])) == 2
11 @test ndims(unittetrahedron()) == 3 11 @test ndims(unittetrahedron()) == 3
12 end 12 end
13 13
14 @testset "HyperBox" begin 14 @testset "HyperBox" begin
15 @test HyperBox{<:Any, 2} <: ParameterSpace{2}
15 @test HyperBox([1,1], [2,2]) isa HyperBox{Int, 2} 16 @test HyperBox([1,1], [2,2]) isa HyperBox{Int, 2}
16 17
17 @test limits(HyperBox([1,2], [3,4])) == ([1,2], [3,4]) 18 @test limits(HyperBox([1,2], [3,4])) == ([1,2], [3,4])
18 @test limits(HyperBox([1,2], [3,4]), 1) == (1,3) 19 @test limits(HyperBox([1,2], [3,4]), 1) == (1,3)
19 @test limits(HyperBox([1,2], [3,4]), 2) == (2,4) 20 @test limits(HyperBox([1,2], [3,4]), 2) == (2,4)
33 @test unithyperbox(4) isa HyperBox{Float64,4} 34 @test unithyperbox(4) isa HyperBox{Float64,4}
34 @test limits(unithyperbox(4)) == ([0,0,0,0],[1,1,1,1]) 35 @test limits(unithyperbox(4)) == ([0,0,0,0],[1,1,1,1])
35 end 36 end
36 37
37 @testset "Simplex" begin 38 @testset "Simplex" begin
39 @test Simplex{<:Any, 3} <: ParameterSpace{3}
38 @test Simplex([1,2], [3,4]) isa Simplex{Int, 2} 40 @test Simplex([1,2], [3,4]) isa Simplex{Int, 2}
39 @test Simplex([1,2,3], [4,5,6],[1,1,1]) isa Simplex{Int, 3} 41 @test Simplex([1,2,3], [4,5,6],[1,1,1]) isa Simplex{Int, 3}
40 42
41 @test verticies(Simplex([1,2], [3,4])) == ([1,2], [3,4]) 43 @test verticies(Simplex([1,2], [3,4])) == ([1,2], [3,4])
42 44