-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add test/redund.jl Tests should fail for this commit * Translate 0-based indices to Julia's 1-based in removevredundancy! * Set ?linearitydetected = true in detect?linearity! * Update to Polyhedra v0.8 * Revert setting ?linearitydetected = true in detect?linearity!
- Loading branch information
Showing
4 changed files
with
33 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@testset "Tests for redundancy removal" begin | ||
|
||
@testset "Test for issue #52" begin | ||
A = [0 1 0; -1 0 0; 0 -1 0; 0 0 -1; 1 0 0] | ||
b = [2, -1, -1, -1, 2] | ||
linset = BitSet(5) | ||
hr = hrep(A, b, linset) | ||
|
||
V = [2 1 1; | ||
2 2 1] | ||
R = [0 0 1] | ||
exp = vrep(V, R) | ||
|
||
@testset "removevredundancy!" begin | ||
p = polyhedron(hr, LRSLib.Library()) | ||
removevredundancy!(p) | ||
@test nrays(p) == nrays(exp) | ||
end | ||
|
||
@testset "detectvlinearity! and then removevredundancy!" begin | ||
p = polyhedron(hr, LRSLib.Library()) | ||
detectvlinearity!(p) | ||
removevredundancy!(p) | ||
@test nrays(p) == nrays(exp) | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ include("matrix.jl") | |
include("polyhedron.jl") | ||
include("lp.jl") | ||
include("nash.jl") | ||
include("redund.jl") |