Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1052 - Remove type constraint #1059

Merged
merged 1 commit into from
Jan 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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