Skip to content

Commit

Permalink
change behavior for polytopes without constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed Dec 12, 2019
1 parent 6d6c177 commit 79c7f0f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Interfaces/AbstractPolytope.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ function isuniversal(P::AbstractPolytope{N}, witness::Bool=false
)::Union{Bool, Tuple{Bool, Vector{N}}} where {N<:Real}
if witness
constraints = constraints_list(P)
@assert !isempty(constraints) "polytopes without constraints are not " *
"allowed"
if isempty(constraints)
return (true, N[]) # special case for polytopes without constraints
end
return isuniversal(constraints[1], true)
else
return false
Expand Down

0 comments on commit 79c7f0f

Please sign in to comment.