politopix
5.0.0
|
Model a capped polytope i.e. a polytope where we can partition the facets in two sets: regular facets and cap facets which can be removed. More...
#include <Polytope_Rn.h>
Public Member Functions | |
CappedPolytope_Rn (boost::shared_ptr< Polytope_Rn > pol, const std::set< unsigned int > &set) | |
Constructor. More... | |
CappedPolytope_Rn () | |
virtual | ~CappedPolytope_Rn () |
Destructor. More... | |
void | setPolytope (boost::shared_ptr< Polytope_Rn > pol) |
boost::shared_ptr< Polytope_Rn > | getPolytope () |
Return the capped polytope under its current description. More... | |
const boost::shared_ptr< PolyhedralCone_Rn > & | getPrismaticHPolyhedron () |
Return the uncapped polytope i.e. the prismatic polyhedron under the H-description. More... | |
void | resetConstantsOfAllHalfSpaces (double cst) |
Reset all halfspaces constants to the same value. More... | |
void | resetConstantOfGivenHalfSpace (double cst, unsigned int fctNb) |
Reset the constant of a given halfspace. More... | |
void | setCappedFacets (const std::set< unsigned int > &set) |
boost::shared_ptr< CappedPolytope_Rn > | sum (const boost::shared_ptr< CappedPolytope_Rn > &pol2sum, double bb_size=1000.) |
void | sum (const std::vector< boost::shared_ptr< CappedPolytope_Rn > > &allPolytopes0) |
Perform the sum of all the capped polytopes stored in the array. More... | |
void | intersect (const std::vector< boost::shared_ptr< CappedPolytope_Rn > > &allPolytopes0) |
boost::shared_ptr< CappedPolytope_Rn > | intersect (const boost::shared_ptr< CappedPolytope_Rn > &pol2intersect) |
bool | isIncluded (const boost::shared_ptr< CappedPolytope_Rn > &B) const |
int | scalingFactor (double factor) |
bool | checkTopologyAndGeometry () const |
void | save (const std::string &pathA) |
void | load (const std::string &pathA, double bb_size=10000.) |
void | dump (std::ostream ¤t_ostream) const |
Static Public Member Functions | |
static bool | isIncluded (const boost::shared_ptr< CappedPolytope_Rn > &firstBody, const boost::shared_ptr< CappedPolytope_Rn > &secondBody, double &minmaxDistance) |
Test whether firstBody is inside secondBody. More... | |
static std::string | getName () |
static std::string | getFileExtension () |
Protected Attributes | |
std::set< unsigned int > | _operandCaps |
Contain the number of the facets which are cap facets. More... | |
boost::shared_ptr< Polytope_Rn > | _polytope |
boost::shared_ptr< PolyhedralCone_Rn > | _prismaticPolyhedron |
The uncapped polytope i.e. the polytope without its capped half-spaces. H-description(_prismaticPolyhedron) = H-description(_polytope) - H-description(_operandCaps) More... | |
Model a capped polytope i.e. a polytope where we can partition the facets in two sets: regular facets and cap facets which can be removed.
Definition at line 152 of file Polytope_Rn.h.
|
inline |
Constructor.
Definition at line 156 of file Polytope_Rn.h.
|
inline |
|
inlinevirtual |
Destructor.
Definition at line 164 of file Polytope_Rn.h.
|
inline |
Definition at line 259 of file Polytope_Rn.h.
|
inline |
Definition at line 265 of file Polytope_Rn.h.
|
inlinestatic |
Definition at line 274 of file Polytope_Rn.h.
|
inlinestatic |
Definition at line 272 of file Polytope_Rn.h.
|
inline |
Return the capped polytope under its current description.
Definition at line 169 of file Polytope_Rn.h.
|
inline |
Return the uncapped polytope i.e. the prismatic polyhedron under the H-description.
Definition at line 172 of file Polytope_Rn.h.
boost::shared_ptr< CappedPolytope_Rn > CappedPolytope_Rn::intersect | ( | const boost::shared_ptr< CappedPolytope_Rn > & | pol2intersect | ) |
|
inline |
Definition at line 229 of file Polytope_Rn.h.
|
inline |
Definition at line 246 of file Polytope_Rn.h.
|
inlinestatic |
Test whether firstBody is inside secondBody.
firstBody | |
secondBody | |
minmaxDistance | If \[ projectionVertices(firstBody) \not\subset secondBody \] minmaxDistance is the minimum distance from firstBody to secondBody, otherwise it is the maximum distance shift to apply to the half-spaces of secondBody to include firstBody. |
\[ firstBody \subset secondBody \]
, false otherwise.Definition at line 253 of file Polytope_Rn.h.
void CappedPolytope_Rn::load | ( | const std::string & | pathA, |
double | bb_size = 10000. |
||
) |
|
inline |
Reset the constant of a given halfspace.
Definition at line 196 of file Polytope_Rn.h.
|
inline |
Reset all halfspaces constants to the same value.
Definition at line 182 of file Polytope_Rn.h.
void CappedPolytope_Rn::save | ( | const std::string & | pathA | ) |
int CappedPolytope_Rn::scalingFactor | ( | double | factor | ) |
|
inline |
Definition at line 209 of file Polytope_Rn.h.
|
inline |
Definition at line 166 of file Polytope_Rn.h.
boost::shared_ptr< CappedPolytope_Rn > CappedPolytope_Rn::sum | ( | const boost::shared_ptr< CappedPolytope_Rn > & | pol2sum, |
double | bb_size = 1000. |
||
) |
|
inline |
Perform the sum of all the capped polytopes stored in the array.
Definition at line 214 of file Polytope_Rn.h.
|
protected |
Contain the number of the facets which are cap facets.
Definition at line 278 of file Polytope_Rn.h.
|
protected |
Definition at line 280 of file Polytope_Rn.h.
|
protected |
The uncapped polytope i.e. the polytope without its capped half-spaces. H-description(_prismaticPolyhedron) = H-description(_polytope) - H-description(_operandCaps)
Definition at line 283 of file Polytope_Rn.h.