From e5fa7cf3c9250a8e7f9d7b98d574d12cec40bfa8 Mon Sep 17 00:00:00 2001 From: schillic Date: Thu, 24 Jan 2019 20:45:16 +0100 Subject: [PATCH] remove type constraint for constraints_list(::LinearMap) --- docs/src/lib/operations.md | 2 +- src/LinearMap.jl | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/src/lib/operations.md b/docs/src/lib/operations.md index e2b94b6035..0ef5038d8b 100644 --- a/docs/src/lib/operations.md +++ b/docs/src/lib/operations.md @@ -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)) diff --git a/src/LinearMap.jl b/src/LinearMap.jl index 30afd81278..dfb5d4eb0d 100644 --- a/src/LinearMap.jl +++ b/src/LinearMap.jl @@ -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. @@ -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