Skip to content

Commit

Permalink
remove type constraint for constraints_list(::LinearMap)
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed Jan 24, 2019
1 parent 0988a89 commit e5fa7cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/src/lib/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ an_element(::LinearMap{N}) where {N<:Real}
isbounded(::LinearMap)
isempty(::LinearMap)
vertices_list(::LinearMap{N}) where {N<:Real}
constraints_list(::LinearMap{N, S}) where {N<:Real, S<:Union{AbstractPolytope{N}, HPolyhedron{N}}}
constraints_list(::LinearMap{N}) where {N<:Real}
```
Inherited from [`LazySet`](@ref):
* [`norm`](@ref norm(::LazySet, ::Real))
Expand Down
6 changes: 2 additions & 4 deletions src/LinearMap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,7 @@ function vertices_list(lm::LinearMap{N})::Vector{Vector{N}} where {N<:Real}
end

"""
constraints_list(lm::LinearMap{N, S}) where
{N<:Real, S<:Union{AbstractPolytope{N}, HPolyhedron{N}}}
constraints_list(lm::LinearMap{N}) where {N<:Real}
Return the list of constraints of a (polyhedral) linear map.
Expand All @@ -374,7 +373,6 @@ We assume that the underlying set `X` is polyhedral, i.e., offers a method
We fall back to a concrete set representation and apply `linear_map`.
"""
function constraints_list(lm::LinearMap{N, S}) where
{N<:Real, S<:Union{AbstractPolytope{N}, HPolyhedron{N}}}
function constraints_list(lm::LinearMap{N}) where {N<:Real}
return constraints_list(linear_map(lm.M, lm.X))
end

0 comments on commit e5fa7cf

Please sign in to comment.