Skip to content

Commit

Permalink
Use Polyhedra fallback for printing CDD matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed May 30, 2018
1 parent 6d7021b commit d8b1091
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,4 @@ function Base.show(io::IO, matrix::Cdd_MatrixData{T}) where T

end

Base.show(io::IO, matrix::CDDMatrix) = Base.show(io, unsafe_load(matrix.matrix))

export CDDMatrix, CDDInequalityMatrix, CDDGeneratorMatrix, isaninequalityrepresentation
8 changes: 4 additions & 4 deletions test/permutahedron.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
ineoutmf = copyinequalities(polyf)
extm = copygenerators(poly)
extmf = copygenerators(polyf)
@test string(ineoutm) == "H-representation
@test string(unsafe_load(ineoutm.matrix)) == "H-representation
linearity 1 1
begin
7 4 rational
Expand All @@ -25,7 +25,7 @@ begin
-1//1 0//1 1//1 0//1
-1//1 0//1 0//1 1//1
end"
@test string(ineoutmf) == "H-representation
@test string(unsafe_load(ineoutmf.matrix)) == "H-representation
linearity 1 1
begin
7 4 real
Expand All @@ -37,7 +37,7 @@ begin
-1.0 -0.0 1.0 -0.0
-1.0 -0.0 -0.0 1.0
end"
@test string(extm) == "V-representation
@test string(unsafe_load(extm.matrix)) == "V-representation
begin
6 4 rational
1//1 2//1 3//1 1//1
Expand All @@ -47,7 +47,7 @@ begin
1//1 2//1 1//1 3//1
1//1 1//1 2//1 3//1
end"
@test string(extmf) == "V-representation
@test string(unsafe_load(extmf.matrix)) == "V-representation
begin
6 4 real
1.0 2.0 3.0 0.9999999999999998
Expand Down

0 comments on commit d8b1091

Please sign in to comment.