From d45835aa07aa9edb2cf405f69b973faf4f6b5407 Mon Sep 17 00:00:00 2001 From: schillic Date: Fri, 12 Jul 2024 13:06:15 +0200 Subject: [PATCH] add tests for SSPZ --- .../SimpleSparsePolynomialZonotopeModule.jl | 2 +- test/Sets/SimpleSparsePolynomialZonotope.jl | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Sets/SimpleSparsePolynomialZonotope/SimpleSparsePolynomialZonotopeModule.jl b/src/Sets/SimpleSparsePolynomialZonotope/SimpleSparsePolynomialZonotopeModule.jl index 832323985e..6cd66c6da8 100644 --- a/src/Sets/SimpleSparsePolynomialZonotope/SimpleSparsePolynomialZonotopeModule.jl +++ b/src/Sets/SimpleSparsePolynomialZonotope/SimpleSparsePolynomialZonotopeModule.jl @@ -26,9 +26,9 @@ const SSPZ = SimpleSparsePolynomialZonotope include("center.jl") include("convex_hull.jl") include("genmat.jl") -include("isoperationtype.jl") include("genmat_dep.jl") include("genmat_indep.jl") +include("isoperationtype.jl") include("ngens.jl") include("ngens_indep.jl") include("polynomial_order.jl") diff --git a/test/Sets/SimpleSparsePolynomialZonotope.jl b/test/Sets/SimpleSparsePolynomialZonotope.jl index e6ff34ab5b..d22fceb38c 100644 --- a/test/Sets/SimpleSparsePolynomialZonotope.jl +++ b/test/Sets/SimpleSparsePolynomialZonotope.jl @@ -12,6 +12,10 @@ for N in [Float64, Float32, Rational{Int}] @test expmat(S) == E @test dim(S) == 2 @test ngens(S) == 2 + @test ngens_dep(S) == 2 + @test ngens_indep(S) == 0 + @test genmat_dep(S) == G + @test genmat_indep(S) == zeros(N, 2, 0) @test nparams(S) == 2 @test order(S) == 1 // 1 @test polynomial_order(S) == 6