CDDLib.jl
CDDLib.jl copied to clipboard
Wrap dd_Matrix2Adjacency
There is no Polyhedra.jl interface for that yet so currently, it's just:
julia> using CDDLib, Polyhedra
julia> vsquare = vrep([[i, j] for i in [-1, 1] for j in [-1, 1]])
V-representation Polyhedra.PointsHull{Int64, Vector{Int64}, Int64}:
4-element iterator of Vector{Int64}:
[-1, -1]
[-1, 1]
[1, -1]
[1, 1]
julia> p = polyhedron(vsquare, CDDLib.Library())
Polyhedron CDDLib.Polyhedron{Float64}:
4-element iterator of Vector{Float64}:
[-1.0, -1.0]
[-1.0, 1.0]
[1.0, -1.0]
[1.0, 1.0]
julia> matrix2adjacency(p.ext)
4-element Vector{BitSet}:
BitSet([2, 3])
BitSet([1, 4])
BitSet([1, 4])
BitSet([2, 3])
Closes https://github.com/JuliaPolyhedra/CDDLib.jl/issues/71
Codecov Report
Merging #72 (ffe5941) into master (a5d8929) will decrease coverage by
1.05%. The diff coverage is36.84%.
@@ Coverage Diff @@
## master #72 +/- ##
==========================================
- Coverage 85.58% 84.52% -1.06%
==========================================
Files 12 12
Lines 874 892 +18
==========================================
+ Hits 748 754 +6
- Misses 126 138 +12
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/operations.jl | 86.27% <14.28%> (-3.53%) |
:arrow_down: |
| src/settype.jl | 71.11% <50.00%> (-7.68%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update a5d8929...ffe5941. Read the comment docs.