![]() |
irafhy
Interval arithmetic based Reachability Analysis Framework for Hybrid Automaton
|
#include <polytope.h>


Public Member Functions | |
| Polytope () | |
| constructor More... | |
| Polytope (const Polytope &polytope)=default | |
| copy constructor More... | |
| Polytope (Polytope &&polytope) noexcept=default | |
| move constructor More... | |
| Polytope (const std::vector< Point > &points) | |
| constructor with given points More... | |
| Polytope (const std::vector< HalfSpace > &halfSpaces) | |
| constructor with given half spaces More... | |
| Polytope (const std::vector< capd::interval > &constraints) | |
| constructor with given interval constraints More... | |
| Polytope (const capd::C0Rect2Set &set) | |
| constructor with given state set More... | |
| Polytope (const Point ¢er, double radius) | |
| constructor with given center and related radius More... | |
| Polytope (const Eigen::VectorXd ¢er, double radius) | |
| constructor with given coordinate of the center and related radius More... | |
| ~Polytope () override=default | |
| destructor More... | |
| std::vector< Point > | pointConstraints () const |
| get the extreme vertices of the polytope More... | |
| std::vector< HalfSpace > | halfSpaceConstraints () const |
| get the half space constraints of the polytope More... | |
| Point | centroid () const |
| get the centroid of the polytope More... | |
| std::vector< capd::interval > | constraints () const |
| get the variance constraints of all dimensions More... | |
| bool | empty () const override |
| check if the polytope is empty or not More... | |
| int | dimension () const override |
| get the dimension of the space which the polytope in More... | |
| double | volume () const |
| get the volume of the polytope More... | |
| bool | intersect (const Polytope &rhs, Polytope &result) const override |
| check if the current polytope intersect with the given right hand side one or not More... | |
| Polytope | unite (const Polytope &rhs) const override |
| get the union of the current polytope and the given right hand side one More... | |
| bool | contains (const Point &point) const override |
| check if the given point inside the domain which defined by the current polytope or not More... | |
| bool | contains (const Eigen::VectorXd &coordinate) const override |
| check if the given coordinate inside the domain which defined by the current polytope or not More... | |
| Polytope & | operator= (const Polytope &rhs)=default |
| assignment operator More... | |
| Polytope & | operator= (Polytope &&rhs) noexcept=default |
| assignment operator More... | |
Public Member Functions inherited from irafhy::Geometry< Polytope > | |
| virtual | ~Geometry ()=default |
| destructor More... | |
Static Public Member Functions | |
| static Polytope | Empty (std::size_t dimension=0) |
| static constructor of Empty polytope More... | |
Private Member Functions | |
| Polytope (const std::vector< Point > &pointConstraints, const std::vector< HalfSpace > &halfSpaceConstraints, double volume, int dimension) | |
| constructor with given constraints and related information More... | |
| void | init (const convexConstraints &constraints) |
| initialize the polytope with given convex hull More... | |
| std::vector< Point > | verticesEnumerationDualPly (const std::vector< HalfSpace > &halfSpaces) |
| enumerate vertices using dual polytope method More... | |
| std::vector< Point > | verticesEnumerationIntersect (const std::vector< HalfSpace > &halfSpaces) |
| enumerate vertices using intersection computation More... | |
| std::vector< Point > | verticesEnumeration (const std::vector< capd::interval > &constraints) |
| enumerate extreme vertices with given constraints in interval form More... | |
| std::vector< Point > | verticesEnumeration (const Eigen::VectorXd ¢er, double radius) |
| enumerate extreme vertices with given center coordinate and related radius More... | |
Private Attributes | |
| std::vector< Point > | pointConstraints_ |
| point constraints which define the convex hull entity More... | |
| std::vector< HalfSpace > | halfSpaceConstraints_ |
| half spaces constraints which define the convex hull entity More... | |
| double | volume_ = 0.0 |
| volume of the convex hull More... | |
| int | dimension_ = 0 |
| dimension of the space which current convex hull in More... | |
|
private |
constructor with given constraints and related information
| pointConstraints | point constraints of the convex hull entity |
| halfSpaceConstraints | half spaces constraints of the convex hull entity |
| volume | volume of the convex hull |
| dimension | dimension of the space which the polytope in |
References dimension(), dimension_, halfSpaceConstraints(), halfSpaceConstraints_, pointConstraints(), pointConstraints_, volume(), and volume_.

| irafhy::Polytope::Polytope | ( | ) |
constructor
References dimension_, halfSpaceConstraints_, pointConstraints_, and volume_.
Referenced by Empty(), intersect(), and unite().
|
default |
copy constructor
| polytope | given polytope |
|
defaultnoexcept |
move constructor
| polytope | given polytope |
|
explicit |
constructor with given points
| points | given points |
References irafhy::ConvexHull::constraints(), dimension_, halfSpaceConstraints_, init(), pointConstraints_, and volume_.

|
explicit |
constructor with given half spaces
| halfSpaces | given half spaces |
References irafhy::ConvexHull::constraints(), dimension(), dimension_, halfSpaceConstraints_, init(), pointConstraints_, verticesEnumerationIntersect(), and volume_.

|
explicit |
constructor with given interval constraints
| constraints | given interval constraints |
References irafhy::ConvexHull::constraints(), dimension_, halfSpaceConstraints_, init(), pointConstraints_, verticesEnumeration(), and volume_.

|
explicit |
constructor with given state set
| set | given state set |
References dimension(), dimension_, halfSpaceConstraints_, pointConstraints_, and volume_.

| irafhy::Polytope::Polytope | ( | const Point & | center, |
| double | radius | ||
| ) |
constructor with given center and related radius
| center | center of the polytope |
| radius | radius which defines the variance of each dimension |
References irafhy::ConvexHull::constraints(), irafhy::Point::coordinate(), init(), and verticesEnumeration().

| irafhy::Polytope::Polytope | ( | const Eigen::VectorXd & | center, |
| double | radius | ||
| ) |
constructor with given coordinate of the center and related radius
| center | coordinate of the center of the polytope |
| radius | radius which defines the variance of each dimension |
References irafhy::ConvexHull::constraints(), init(), and verticesEnumeration().

|
overridedefault |
destructor
| Point irafhy::Polytope::centroid | ( | ) | const |
get the centroid of the polytope
References pointConstraints_.
| std::vector< capd::interval > irafhy::Polytope::constraints | ( | ) | const |
get the variance constraints of all dimensions
References dimension_, and pointConstraints_.
Referenced by irafhy::CSPSolver::branchPruneSolve().
|
overridevirtual |
check if the given point inside the domain which defined by the current polytope or not
| point | given point |
Implements irafhy::Geometry< Polytope >.
References halfSpaceConstraints_.
Referenced by intersect().
|
overridevirtual |
check if the given coordinate inside the domain which defined by the current polytope or not
| coordinate | given coordinate |
Implements irafhy::Geometry< Polytope >.
References halfSpaceConstraints_.
|
overridevirtual |
get the dimension of the space which the polytope in
Implements irafhy::Geometry< Polytope >.
References dimension_.
Referenced by irafhy::CSPSolver::branchPruneSolve(), Empty(), irafhy::operator<<(), Polytope(), verticesEnumerationDualPly(), and verticesEnumerationIntersect().
|
static |
static constructor of Empty polytope
| dimension | dimension of the space which the polytope in |
References dimension(), irafhy::HalfSpace::Empty(), Polytope(), and irafhy::Point::zero().
Referenced by irafhy::Condition::Empty(), and intersect().

|
overridevirtual |
check if the polytope is empty or not
Implements irafhy::Geometry< Polytope >.
References halfSpaceConstraints_, pointConstraints_, and volume_.
Referenced by irafhy::CSPSolver::branchPruneSolve(), and intersect().
| std::vector< HalfSpace > irafhy::Polytope::halfSpaceConstraints | ( | ) | const |
get the half space constraints of the polytope
References halfSpaceConstraints_.
Referenced by irafhy::CSPSolver::branchPruneSolve(), intersect(), irafhy::operator<<(), and Polytope().
|
private |
initialize the polytope with given convex hull
| constraints |
References irafhy::convexConstraints::dimension(), dimension_, irafhy::convexConstraints::halfSpaceConstraints(), halfSpaceConstraints_, irafhy::convexConstraints::pointConstraints(), pointConstraints_, irafhy::convexConstraints::volume(), and volume_.
Referenced by Polytope().

check if the current polytope intersect with the given right hand side one or not
| rhs | right hand side polytope |
| result | intersection of two polytope if exist |
Implements irafhy::Geometry< Polytope >.
References contains(), dimension_, Empty(), empty(), halfSpaceConstraints(), halfSpaceConstraints_, pointConstraints(), pointConstraints_, and Polytope().

assignment operator
| rhs | right hand side polytope |
assignment operator
| rhs | right hand side polytope |
| std::vector< Point > irafhy::Polytope::pointConstraints | ( | ) | const |
get the extreme vertices of the polytope
References pointConstraints_.
Referenced by intersect(), irafhy::operator<<(), Polytope(), and unite().
get the union of the current polytope and the given right hand side one
| rhs | right hand side polytope |
Implements irafhy::Geometry< Polytope >.
References pointConstraints(), and Polytope().

|
private |
enumerate extreme vertices with given constraints in interval form
| constraints | given space constraints |
Referenced by Polytope().
|
private |
enumerate extreme vertices with given center coordinate and related radius
| center | coordinate of the target domain |
| radius | given radius |
|
private |
enumerate vertices using dual polytope method
| halfSpaces | given half spaces |
References irafhy::ConvexHull::constraints(), dimension(), and irafhy::convexConstraints::faceVerticesIdx().

|
private |
enumerate vertices using intersection computation
| halfSpaces | given half spaces |
References dimension(), and matplotlibcpp::fill().
Referenced by Polytope().

| double irafhy::Polytope::volume | ( | ) | const |
get the volume of the polytope
References volume_.
Referenced by irafhy::operator<<(), and Polytope().
|
private |
dimension of the space which current convex hull in
Referenced by constraints(), dimension(), init(), intersect(), and Polytope().
|
private |
half spaces constraints which define the convex hull entity
Referenced by contains(), empty(), halfSpaceConstraints(), init(), intersect(), and Polytope().
|
private |
point constraints which define the convex hull entity
Referenced by centroid(), constraints(), empty(), init(), intersect(), pointConstraints(), and Polytope().
|
private |
volume of the convex hull
Referenced by empty(), init(), Polytope(), and volume().