We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
julia> using Test, Revise, LazySets, LinearAlgebra julia> N = Float64; julia> Z = Zonotope(zeros(N, 3), Matrix(N(1)*I, 3, 3)) Zonotope{Float64}([0.0, 0.0, 0.0], [1.0 0.0 0.0; 0.0 1.0 0.0; 0.0 0.0 1.0]) julia> B = BallInf(zeros(N, 3), N(1)) # equivalent to Z BallInf{Float64}([0.0, 0.0, 0.0], 1.0) julia> @which convert(HPolytope, Z) convert(::Type{HPolytope}, P::AbstractPolytope) in LazySets at /Users/forets/.julia/dev/LazySets/src/convert.jl:147
But it is in general more efficient to do HPolytope(constraints_list(Z)); i.e. use the HPolyhedron implementation:
HPolytope(constraints_list(Z))
HPolyhedron
function convert(::Type{HPolytope}, P::AbstractPolytope) return convert(HPolytope, convert(VPolytope, P)) end function convert(::Type{HPolyhedron}, P::AbstractPolytope) return HPolyhedron(constraints_list(P)) end
Should we add a specific method
function convert(::Type{HPolytope}, Z::Zonotope) return HPolytope(constraints_list(Z)) end
More generally, should we add a kwarg to convert such that it allows to choose the implementation?
convert
The text was updated successfully, but these errors were encountered:
Duplicate of #932.
Sorry, something went wrong.
No branches or pull requests
But it is in general more efficient to do
HPolytope(constraints_list(Z))
; i.e. use theHPolyhedron
implementation:Should we add a specific method
More generally, should we add a kwarg to
convert
such that it allows to choose the implementation?The text was updated successfully, but these errors were encountered: