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

Fallback conversion to VPolytope #2466

Closed
mforets opened this issue Dec 30, 2020 · 0 comments · Fixed by #2467
Closed

Fallback conversion to VPolytope #2466

mforets opened this issue Dec 30, 2020 · 0 comments · Fixed by #2467
Assignees
Labels
conversion 🔄 Conversion between types

Comments

@mforets
Copy link
Member

mforets commented Dec 30, 2020

A method similar to this one

function convert(::Type{VPolygon}, X::LazySet)
but for VPolytope seems to be missing.

convert(VPolytope, rand(3, 3) * rand(BallInf, dim=3))

MethodError: Cannot `convert` an object of type 
  LinearMap{Float64,BallInf{Float64,Array{Float64,1}},Float64,Array{Float64,2}} to an object of type 
  VPolytope
Closest candidates are:
  convert(::Type{VPolytope}, !Matched::VPolytope) at /home/mforets/.julia/dev/LazySets/src/convert.jl:8
  convert(::Type{VPolytope}, !Matched::HPolytope) at /home/mforets/.julia/dev/LazySets/src/convert.jl:239
  convert(::Type{VPolytope}, !Matched::AbstractPolytope) at /home/mforets/.julia/dev/LazySets/src/convert.jl:110
  ...

Stacktrace:
 [1] top-level scope at In[29]:1
 [2] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1091
@mforets mforets added the conversion 🔄 Conversion between types label Dec 30, 2020
@mforets mforets self-assigned this Dec 30, 2020
mforets added a commit that referenced this issue Dec 30, 2020
* add generic conversion to VPolytope

* Update src/convert.jl

Co-authored-by: Christian Schilling <[email protected]>

* Update src/convert.jl

Co-authored-by: Christian Schilling <[email protected]>

Co-authored-by: Christian Schilling <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conversion 🔄 Conversion between types
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant