Skip to content

Commit

Permalink
Check original system has no solution (see issue #80).
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmtroffaes committed Jan 13, 2025
1 parent 72c1ceb commit 77afb76
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/gmp/test_issue80.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

def test_empty_v_rep() -> None:
mat = cdd.gmp.matrix_from_array(arr, rep_type=cdd.RepType.INEQUALITY)
# check original system has no solution
poly_orig = cdd.gmp.polyhedron_from_matrix(mat)
v_rep_orig = cdd.gmp.copy_output(poly_orig)
assert not v_rep_orig.array
# check canonical form has no solution either
lin_set, red_set, indices = cdd.gmp.matrix_canonicalize(mat)
assert lin_set == {0, 1, 2, 3, 4, 5, 6, 7}
assert not red_set
Expand Down
5 changes: 5 additions & 0 deletions test/test_issue80.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@

def test_empty_v_rep() -> None:
mat = cdd.matrix_from_array(arr, rep_type=cdd.RepType.INEQUALITY)
# check original system has no solution
poly_orig = cdd.polyhedron_from_matrix(mat)
v_rep_orig = cdd.copy_output(poly_orig)
assert not v_rep_orig.array
# check canonical form has no solution either
lin_set, red_set, indices = cdd.matrix_canonicalize(mat)
assert lin_set == {0, 1, 2, 3, 4, 5, 6, 7}
assert not red_set
Expand Down

0 comments on commit 77afb76

Please sign in to comment.