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

Special treatment of symmetric polyhedron and polyhedral cone #75

Open
blegat opened this issue Mar 14, 2018 · 0 comments
Open

Special treatment of symmetric polyhedron and polyhedral cone #75

blegat opened this issue Mar 14, 2018 · 0 comments

Comments

@blegat
Copy link
Member

blegat commented Mar 14, 2018

The fact that a polyhedron is symmetric and/or homogeneous can be determined only with type information if we add the following elements

struct HomHyperPlane{N, T, AT}
    a::AT # ⟨a, x⟩ = 0
end
struct HomHalfSpace{N, T, AT}
    a::AT # ⟨a, x⟩ ≤ 0
end
struct SymHalfSpace{N, T, AT}
    a::AT # -β ≤ ⟨a, x⟩ ≤ β
    β::T
end
struct SymPoint{N, T, AT}
    a::AT # convexhull(-a, a)
end

We would have the following

Polyhedron Symmetric Homogeneous Linear
Symmetric Yes Yes
Homogeneous Yes Yes
H-rep
hyperplanetype HyperPlane HomHyperPlane HomHyperPlane HomHyperPlane
halfspacetype HalfSpace SymHalfSpace HomHalfSpace
V-rep
pointtype AbstractVector SymPoint
linetype Line Line Line Line
raytype Ray Ray

The advantage of encoding symmetric and/or homogeneity with a type isn't only efficiency but also accuracy. Roundoff error might make symmetry disappear while it was present in the data at the beginning.
When constructing a representation, e.g. with hrep or vrep, the type of the representation will be determined in a type-stable way.

Two additional category exist but they are different as they are not type-inferrable from both representation:

Polyhedron Polytope
Bounded Yes
V-rep
pointtype AbstractVector AbstractVector
linetype Line
raytype Ray
Polyhedron Affine
Affine Yes
H-rep
hyperplanetype HyperPlane HyperPlane
halfspacetype HalfSpace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant