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

tohrep and tovrep do not preserve numeric type #974

Closed
schillic opened this issue Jan 6, 2019 · 1 comment
Closed

tohrep and tovrep do not preserve numeric type #974

schillic opened this issue Jan 6, 2019 · 1 comment
Assignees
Labels
documentation 📖 Documentation and manual

Comments

@schillic
Copy link
Member

schillic commented Jan 6, 2019

julia> N = Float32
Float32

julia> H = BallInf(N[0, 0], N(1))
BallInf{Float32}(Float32[0.0, 0.0], 1.0f0)

julia> P = convert(VPolytope, H)
VPolytope{Float32}(Array{Float32,1}[[1.0, 1.0], [-1.0, 1.0], [1.0, -1.0], [-1.0, -1.0]])

julia> tohrep(P)
HPolytope{Float64}(LazySets.HalfSpace{Float64}[
    HalfSpace{Float64}([-0.0, 0.333333], 0.333333),
    HalfSpace{Float64}([0.181818, -0.0], 0.181818),
    HalfSpace{Float64}([-0.0, -0.15], 0.15),
    HalfSpace{Float64}([-0.139535, -0.0], 0.139535)])
@schillic schillic added the bug 🐛 Something isn't working label Jan 6, 2019
@schillic schillic self-assigned this Jan 10, 2019
@schillic schillic changed the title tohrep does not preserve numeric type tohrep and tovrep do not preserve numeric type Jan 10, 2019
@schillic
Copy link
Member Author

For the record: We decided to accept this behavior. CDDLib only supports Float64 and Rational{BigInt}, and it does not make sense to convert back to a different type on our end. The default Polyhedra backend also works for Rational{Int}.

@schillic schillic added robustness 💪 Tests and checks and removed bug 🐛 Something isn't working labels Jan 12, 2019
schillic added a commit that referenced this issue Jan 13, 2019
#974 - tohrep and tovrep do not preserve numeric type
@schillic schillic added documentation 📖 Documentation and manual and removed robustness 💪 Tests and checks labels Jan 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📖 Documentation and manual
Projects
None yet
Development

No branches or pull requests

1 participant