Skip to content

Commit

Permalink
Merge pull request #19 from JuliaPolyhedra/kwconstr
Browse files Browse the repository at this point in the history
Remove keywork constructor
  • Loading branch information
blegat committed Jul 27, 2017
2 parents 2397460 + 6f95932 commit d4bd403
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,6 @@ end
function CDDInequalityMatrix{N, T, S}(eqs, ineqs) where {N, T, S}
CDDInequalityMatrix(initmatrix(true, eqs, ineqs))
end
function CDDInequalityMatrix{N, T, S}(; eqs=nothing, ineqs=nothing) where {N, T, S}
CDDInequalityMatrix{N, T, S}(eqs, ineqs)
end

nhreps(matrix::CDDInequalityMatrix) = length(matrix)
neqs(matrix::CDDInequalityMatrix) = dd_set_card(unsafe_load(matrix.matrix).linset)
Expand Down Expand Up @@ -294,9 +291,6 @@ end
function CDDGeneratorMatrix{N,T,S}(points, rays) where {N, T, S}
CDDGeneratorMatrix(initmatrix(false, rays, points))
end
function CDDGeneratorMatrix{N,T,S}(; rays=nothing, points=nothing) where {N, T, S}
CDDGeneratorMatrix{N, T, S}(points, rays)
end

nvreps(matrix::CDDGeneratorMatrix) = length(matrix)
function npoints(matrix::CDDGeneratorMatrix)
Expand Down
8 changes: 8 additions & 0 deletions src/polyhedron.jl
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ function Polyhedra.polyhedron{N}(repit::Union{Representation{N},HRepIterator{N},
T = polytypeforprecision(lib.precision)
CDDPolyhedron{N, T}(repit)
end
function Polyhedrapolyhedron{N}(hps::EqIterator{N}, hss::IneqIterator{N}, lib::CDDLibrary)
T = polytypeforprecision(lib.precision)
CDDPolyhedron{N, T}(hps, hss)
end
function Polyhedrapolyhedron{N}(ps::PointIterator{N}, rs::RayIterator{N}, lib::CDDLibrary)
T = polytypeforprecision(lib.precision)
CDDPolyhedron{N, T}(ps, rs)
end
function Polyhedra.polyhedron(lib::CDDLibrary; eqs=nothing, ineqs=nothing, points=nothing, rays=nothing)
its = [eqs, ineqs, points, rays]
i = findfirst(x -> !(x === nothing), its)
Expand Down

0 comments on commit d4bd403

Please sign in to comment.