politopix  5.0.0
PolyhedralCone_Rn Class Reference

Model a polyhedral cone using its two equivalent definitions : the convex hull and the half-space intersection. We store its edges in _listOfHS and the positive combination of these vectors generates the polyhedral cone. More...

#include <PolyhedralCone_Rn.h>

Inheritance diagram for PolyhedralCone_Rn:
Inheritance graph
Collaboration diagram for PolyhedralCone_Rn:
Collaboration graph

Public Member Functions

 PolyhedralCone_Rn ()
 Constructor. More...
 
 PolyhedralCone_Rn (const PolyhedralCone_Rn &A)
 Constructor. More...
 
virtual ~PolyhedralCone_Rn ()
 Destructor. More...
 
virtual unsigned int dimension () const
 Return the space dimension. More...
 
virtual bool isBounded () const
 Tell whether this polyhedron is bounded or not, polyhedral cones are not. More...
 
virtual unsigned int neigbourhoodCondition () const
 Two edges are neighbours in a polyhedral cone <=> they share at least (n-2) facets. More...
 
virtual unsigned int numberOfGeneratorsPerFacet () const
 Each facet in a polyhedral cone has got (n-1) edges. More...
 
void reset ()
 Remove all half-spaces and generators. More...
 
unsigned int numberOfHalfSpaces () const
 Get the total number of half-spaces. More...
 
boost::shared_ptr< HalfSpace_RnaddHalfSpace (boost::shared_ptr< HalfSpace_Rn > hs, bool check=false)
 Add the current half-space in its list. More...
 
void removeHalfSpaceFromListAndGenerators (const boost::shared_ptr< HalfSpace_Rn > &hs)
 Remove the half-space given as parameter from its list and from all generators. More...
 
void removeHalfSpace (unsigned int j)
 Remove the half-space number j from its list. More...
 
void removeHalfSpaces (const std::set< boost::shared_ptr< HalfSpace_Rn > > &setOfRedundantHS)
 Remove the half-space number j from its list. More...
 
unsigned int getHalfSpaceNumber (const boost::shared_ptr< HalfSpace_Rn > &F) const
 For a given half-space, return its list index. More...
 
const boost::shared_ptr< HalfSpace_Rn > & getHalfSpace (unsigned int i) const
 Return the i-th half-space. More...
 
listOfGeometricObjects< boost::shared_ptr< HalfSpace_Rn > > & getListOfHalfSpaces ()
 Return the list of half-spaces. More...
 
const listOfGeometricObjects< boost::shared_ptr< HalfSpace_Rn > > & getListOfHalfSpaces () const
 Return the list of half-spaces. More...
 
void setListOfHalfSpaces (const listOfGeometricObjects< boost::shared_ptr< HalfSpace_Rn > > &hsList)
 Set a new list of half-spaces. More...
 
unsigned int numberOfGenerators () const
 Give the total number of generators. More...
 
void addGenerator (boost::shared_ptr< Generator_Rn > vx)
 Add the given generator. More...
 
const boost::shared_ptr< Generator_Rn > & getGenerator (unsigned int i) const
 Return the i-th generator. More...
 
unsigned int getGeneratorNumber (boost::shared_ptr< Generator_Rn > G) const
 For a given generator, return its list index. More...
 
const listOfGeometricObjects< boost::shared_ptr< Generator_Rn > > & getListOfGenerators () const
 Return the list of generators. More...
 
unsigned int getListOfGeneratorsSD (std::vector< boost::shared_ptr< Generator_Rn_SD > > &currentListOfGeneratorsSD) const
 
void setListOfGeneratorsSD (const std::vector< boost::shared_ptr< Generator_Rn_SD > > &gnList)
 Set a new list of generators. The list of half-spaces should have been previously set. More...
 
void relocateGenerators ()
 
void setListOfGenerators (const listOfGeometricObjects< boost::shared_ptr< Generator_Rn > > &gnList)
 Set a new list of generators. More...
 
bool checkNeighbours (const boost::shared_ptr< Generator_Rn > &V1, const boost::shared_ptr< Generator_Rn > &V2, std::vector< boost::shared_ptr< HalfSpace_Rn > > &commonFacets, const std::set< boost::shared_ptr< HalfSpace_Rn > > &listOfRedundantHS) const
 
bool isIncluded (const boost::shared_ptr< PolyhedralCone_Rn > &B) const
 Test whether the current polytope V-description is inside the polytope B H-description. More...
 
bool checkNeighbours (const boost::shared_ptr< Generator_Rn > &V1, const boost::shared_ptr< Generator_Rn > &V2, std::vector< boost::shared_ptr< HalfSpace_Rn > > &commonFacets, unsigned int topologicalCode=1) const
 
bool checkNeighbours (const boost::shared_ptr< Generator_Rn > &V1, const boost::shared_ptr< Generator_Rn > &V2, std::vector< HalfSpace_Rn * > &commonFacets, unsigned int topologicalCode=1) const
 Check for polytopes that vertices share (n-1) facets. For polyhedral cones, it must check that vectors share (n-2) facets. More...
 
bool checkNeighbours (const boost::shared_ptr< Generator_Rn_SD > &genIn, const boost::shared_ptr< Generator_Rn_SD > &genOut, std::vector< unsigned int > &commonFacets) const
 Check for polytopes that vertices share (n-1) facets. For polyhedral cones, it must check that vectors share (n-2) facets. More...
 
bool checkNeighboursWithHSnumbers (const boost::shared_ptr< Generator_Rn > &V1, const boost::shared_ptr< Generator_Rn > &V2, std::vector< HalfSpace_Rn * > &commonFacets, const std::set< boost::shared_ptr< HalfSpace_Rn > > &listOfRedundantHS, unsigned int topologicalCode=1) const
 Check for polytopes that vertices share (n-1) facets. For polyhedral cones, it must check that vectors share (n-2) facets. More...
 
void fillNeighbourMatrix (std::vector< std::vector< unsigned int > > &neighboursA, unsigned int topologicalCode=1) const
 
void fillIrredundantNeighbourMatrix (std::vector< std::vector< unsigned int > > &neighboursA) const
 
virtual bool checkTopologyAndGeometry (bool check_all=false) const
 As stated by Komei Fukuda "the complexity of the polyhedral verification problem is unknown. Is it in P or in coNP-complete?" So only 3 verifications are made in Rn : More...
 
HalfSpace_Rn::State checkPoint (const Point_Rn &thisPoint) const
 Check a point state against the whole polyhedron. More...
 
HalfSpace_Rn::State checkGenerator (const boost::shared_ptr< Generator_Rn > &thisGen) const
 
HalfSpace_Rn::State checkPoint (const boost::shared_ptr< Generator_Rn > &point, const boost::shared_ptr< HalfSpace_Rn > &halfSpace, double halfSpaceNorm) const
 Check a point state against a half-space. More...
 
bool checkDuplicateGenerators (unsigned int &a, unsigned int &b)
 Make sure no duplicate generators are stored. More...
 
void checkGenerator (unsigned int vtxNumber, std::ostream &this_ostream) const
 Compute all distance from the current point to all half-spaces frontiers. More...
 
bool checkGenerators (const listOfGeometricObjects< boost::shared_ptr< Generator_Rn > > &listGenA, const listOfGeometricObjects< boost::shared_ptr< HalfSpace_Rn > > &listHSB, bool check_all=false) const
 Check the number of facets per generator and make sure it is compliant with its current constraints. It must verify the following property : More...
 
double checkVolumeEquality (const boost::shared_ptr< PolyhedralCone_Rn > &B) const
 
void removeGenerator (unsigned int j)
 Remove the generator number j from its list. More...
 
void removeGenerators (const std::set< boost::shared_ptr< Generator_Rn > > &setToRemove)
 Remove the generators contained in setToRemove. More...
 
virtual bool checkEdges () const
 Always true in the polyhedral cone case. More...
 
void checkFacet (unsigned int fctNumber, std::ostream &this_ostream) const
 
bool checkFacets () const
 Detect redundant half spaces and make sure each facet has the right number of generators. More...
 
bool checkEquality (const boost::shared_ptr< PolyhedralCone_Rn > &B, bool getFaceMapping=false) const
 
void getGeneratorsPerFacet (std::vector< std::vector< unsigned int > > &listOfGeneratorsPerFacet) const
 Get topological connections: for each facet, list its generators. More...
 
void negate ()
 Compute the symmetrical polyhedral cone. More...
 
virtual double createTruncatedGenerator (const boost::shared_ptr< Generator_Rn_SD > &y, const boost::shared_ptr< Generator_Rn_SD > &z, boost::shared_ptr< Generator_Rn_SD > newG, double ay, double az, double b=0.) const
 Create the intersection edge in the truncating algorithm. It is defined by the intersection between a 2-face and a hyperplane, i.e. a (n-1)-face. The new egde is given by this formula where H is the current half space : More...
 
boost::shared_ptr< PolyhedralCone_RncomputeDualPolyhedralCone () const
 Create the intersection edge in the truncating algorithm. It is defined by the intersection between a 2-face and a hyperplane, i.e. a (n-1)-face. The new egde is given by this formula where H is the current half space : More...
 
virtual void dump (std::ostream &this_ostream) const
 Dump the polyhedral structure on the stream passed as an argument. More...
 
void dumpScilab (std::ostream &this_ostream) const
 Dump the generators on on the stream passed as an argument for outputting in Scilab. More...
 
virtual void createBoundingBox (double)
 At the moment this function is useless in the case of polyhedral cones. More...
 
virtual void createBoundingSimplex (double)
 At the moment this function is useless in the case of polyhedral cones. More...
 

Protected Attributes

listOfGeometricObjects< boost::shared_ptr< HalfSpace_Rn > > _listOfHalfSpaces
 The list of half-spaces defining the polyhedron. More...
 
listOfGeometricObjects< boost::shared_ptr< Generator_Rn > > _listOfGenerators
 The convex hull of connected points. More...
 

Friends

class lexIteratorOfListOfHalfSpaces
 
class constIteratorOfListOfHalfSpaces
 

Detailed Description

Model a polyhedral cone using its two equivalent definitions : the convex hull and the half-space intersection. We store its edges in _listOfHS and the positive combination of these vectors generates the polyhedral cone.

Definition at line 47 of file PolyhedralCone_Rn.h.

Constructor & Destructor Documentation

◆ PolyhedralCone_Rn() [1/2]

PolyhedralCone_Rn::PolyhedralCone_Rn ( )
inline

Constructor.

Definition at line 53 of file PolyhedralCone_Rn.h.

Here is the caller graph for this function:

◆ PolyhedralCone_Rn() [2/2]

PolyhedralCone_Rn::PolyhedralCone_Rn ( const PolyhedralCone_Rn A)
inline

Constructor.

Definition at line 56 of file PolyhedralCone_Rn.h.

◆ ~PolyhedralCone_Rn()

virtual PolyhedralCone_Rn::~PolyhedralCone_Rn ( )
inlinevirtual

Destructor.

Definition at line 62 of file PolyhedralCone_Rn.h.

Member Function Documentation

◆ addGenerator()

void PolyhedralCone_Rn::addGenerator ( boost::shared_ptr< Generator_Rn vx)
inline

Add the given generator.

Definition at line 146 of file PolyhedralCone_Rn.h.

Here is the caller graph for this function:

◆ addHalfSpace()

boost::shared_ptr< HalfSpace_Rn > PolyhedralCone_Rn::addHalfSpace ( boost::shared_ptr< HalfSpace_Rn hs,
bool  check = false 
)

Add the current half-space in its list.

Definition at line 138 of file PolyhedralCone_Rn.cpp.

Here is the call graph for this function:

◆ checkDuplicateGenerators()

bool PolyhedralCone_Rn::checkDuplicateGenerators ( unsigned int &  a,
unsigned int &  b 
)

Make sure no duplicate generators are stored.

Parameters
ain case of equality store in this parameter the index of the first equal generator
bin case of equality store in this parameter the index of the second equal generator
Returns
true if there are equal generators, false otherwise.

Definition at line 71 of file PolyhedralCone_Rn.cpp.

Here is the call graph for this function:

◆ checkEdges()

virtual bool PolyhedralCone_Rn::checkEdges ( ) const
inlinevirtual

Always true in the polyhedral cone case.

Reimplemented in Polytope_Rn.

Definition at line 677 of file PolyhedralCone_Rn.h.

◆ checkEquality()

bool PolyhedralCone_Rn::checkEquality ( const boost::shared_ptr< PolyhedralCone_Rn > &  B,
bool  getFaceMapping = false 
) const

Check whether the current polyhedral cones and B are equal or not. If the last variable is true, print the mapping between the generators and faces of both polyhedral cones.

Definition at line 437 of file PolyhedralCone_Rn.cpp.

Here is the call graph for this function:

◆ checkFacet()

void PolyhedralCone_Rn::checkFacet ( unsigned int  fctNumber,
std::ostream &  this_ostream 
) const
inline

Definition at line 679 of file PolyhedralCone_Rn.h.

Here is the call graph for this function:

◆ checkFacets()

bool PolyhedralCone_Rn::checkFacets ( ) const
inline

Detect redundant half spaces and make sure each facet has the right number of generators.

\[ A = Conv(G_1, ..., G_k) = \displaystyle{ \bigcap_{i=1}^m \bar{H}_i^+ } \]

Check that the polytope does not have generators violating a constraint defined by a half-space.

\[ \forall G=(g_1,...,g_n) \in \mathbb{R}^n, \nexists \, \bar{H}_i^+ = \left\{ x : \sum_{j=1}^n a_{ij}x_j \geq 0 \right\} such \, as \, G \not\in \bar{H}_i^+ \]

Check that the polytope does have at least (n-1) generators per half-space frontier.

\[ \forall \bar{H}_i, \exists \, (n-1) \, G=(g_1,...,g_n) \in \mathbb{R}^n, such \, as \, G \in \bar{H}_i \]

Returns
true if everything's OK, false otherwise.

Definition at line 741 of file PolyhedralCone_Rn.h.

Here is the call graph for this function:

◆ checkGenerator() [1/2]

HalfSpace_Rn::State PolyhedralCone_Rn::checkGenerator ( const boost::shared_ptr< Generator_Rn > &  thisGen) const
inline

Definition at line 462 of file PolyhedralCone_Rn.h.

Here is the call graph for this function:

◆ checkGenerator() [2/2]

void PolyhedralCone_Rn::checkGenerator ( unsigned int  vtxNumber,
std::ostream &  this_ostream 
) const
inline

Compute all distance from the current point to all half-spaces frontiers.

Definition at line 485 of file PolyhedralCone_Rn.h.

Here is the call graph for this function:

◆ checkGenerators()

bool PolyhedralCone_Rn::checkGenerators ( const listOfGeometricObjects< boost::shared_ptr< Generator_Rn > > &  listGenA,
const listOfGeometricObjects< boost::shared_ptr< HalfSpace_Rn > > &  listHSB,
bool  check_all = false 
) const
inline

Check the number of facets per generator and make sure it is compliant with its current constraints. It must verify the following property :

\[ \forall G=(g_1,...,g_n) \in \mathbb{R}^n, \exists \, (n-1) \, \bar{H}_i = \left\{ x : \sum_{j=1}^n a_{ij}x_j \geq 0 \right\} such \, as \, G \in \bar{H}_i, i \in \{1,...,n-1\} \]

Returns
true if everything's OK, false otherwise.

Definition at line 523 of file PolyhedralCone_Rn.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkNeighbours() [1/4]

bool PolyhedralCone_Rn::checkNeighbours ( const boost::shared_ptr< Generator_Rn > &  V1,
const boost::shared_ptr< Generator_Rn > &  V2,
std::vector< boost::shared_ptr< HalfSpace_Rn > > &  commonFacets,
const std::set< boost::shared_ptr< HalfSpace_Rn > > &  listOfRedundantHS 
) const
inline

Check for polytopes that vertices share (n-1) facets. For polyhedral cones, it must check that vectors share (n-2) facets.

Parameters
V1the first vertex to check
V2the second vertex to check
commonFacetsthe set of common facets between V1 and V2
listOfRedundantHSthe set of half-spaces that will not be taken into account to compute commonFacets
Returns
false if they are not neighbours, true otherwise with the list of common facets.

Definition at line 229 of file PolyhedralCone_Rn.h.

Here is the caller graph for this function:

◆ checkNeighbours() [2/4]

bool PolyhedralCone_Rn::checkNeighbours ( const boost::shared_ptr< Generator_Rn > &  V1,
const boost::shared_ptr< Generator_Rn > &  V2,
std::vector< boost::shared_ptr< HalfSpace_Rn > > &  commonFacets,
unsigned int  topologicalCode = 1 
) const
inline

Check for polytopes that vertices share (n-1) facets. For polyhedral cones, it must check that vectors share (n-2) facets.

Parameters
V1the first vertex to check
V2the second vertex to check
commonFacetsthe set of common facets between V1 and V2
topologicalCodemodel the level of neighborhood: 1 for an edge, ..., (n-1) for a facet in a n-dimensional space
Returns
false if they are not neighbours, true otherwise with the list of common facets.

Definition at line 260 of file PolyhedralCone_Rn.h.

◆ checkNeighbours() [3/4]

bool PolyhedralCone_Rn::checkNeighbours ( const boost::shared_ptr< Generator_Rn > &  V1,
const boost::shared_ptr< Generator_Rn > &  V2,
std::vector< HalfSpace_Rn * > &  commonFacets,
unsigned int  topologicalCode = 1 
) const
inline

Check for polytopes that vertices share (n-1) facets. For polyhedral cones, it must check that vectors share (n-2) facets.

Parameters
V1the first vertex to check
V2the second vertex to check
commonFacetsthe list of common facets between V1 and V2
topologicalCodemodel the level of neighborhood: 1 for an edge, ..., (n-1) for a facet in a n-dimensional space
Returns
false if they are not neighbours, true otherwise with the list of common facets.

Definition at line 287 of file PolyhedralCone_Rn.h.

◆ checkNeighbours() [4/4]

bool PolyhedralCone_Rn::checkNeighbours ( const boost::shared_ptr< Generator_Rn_SD > &  genIn,
const boost::shared_ptr< Generator_Rn_SD > &  genOut,
std::vector< unsigned int > &  commonFacets 
) const
inline

Check for polytopes that vertices share (n-1) facets. For polyhedral cones, it must check that vectors share (n-2) facets.

Parameters
genInthe first vertex to check
genOutthe second vertex to check
commonFacetsthe list of common facets indices between genIn and genOut

Definition at line 313 of file PolyhedralCone_Rn.h.

◆ checkNeighboursWithHSnumbers()

bool PolyhedralCone_Rn::checkNeighboursWithHSnumbers ( const boost::shared_ptr< Generator_Rn > &  V1,
const boost::shared_ptr< Generator_Rn > &  V2,
std::vector< HalfSpace_Rn * > &  commonFacets,
const std::set< boost::shared_ptr< HalfSpace_Rn > > &  listOfRedundantHS,
unsigned int  topologicalCode = 1 
) const
inline

Check for polytopes that vertices share (n-1) facets. For polyhedral cones, it must check that vectors share (n-2) facets.

Parameters
V1the first vertex to check
V2the second vertex to check
commonFacetsthe list of common facets between V1 and V2
listOfRedundantHSthe list of facets to ignore when we process V1 and V2
topologicalCodemodel the level of neighborhood: 1 for an edge, ..., (n-1) for a facet in a n-dimensional space
Returns
false if they are not neighbours, true otherwise with the list of common facets.

Definition at line 335 of file PolyhedralCone_Rn.h.

◆ checkPoint() [1/2]

HalfSpace_Rn::State PolyhedralCone_Rn::checkPoint ( const boost::shared_ptr< Generator_Rn > &  point,
const boost::shared_ptr< HalfSpace_Rn > &  halfSpace,
double  halfSpaceNorm 
) const

Check a point state against a half-space.

Returns
HalfSpace_Rn::OUT, HalfSpace_Rn::IN or HalfSpace_Rn::ON.

Definition at line 48 of file PolyhedralCone_Rn.cpp.

Here is the call graph for this function:

◆ checkPoint() [2/2]

HalfSpace_Rn::State PolyhedralCone_Rn::checkPoint ( const Point_Rn thisPoint) const

Check a point state against the whole polyhedron.

Returns
HalfSpace_Rn::OUT, HalfSpace_Rn::IN or HalfSpace_Rn::ON.

Definition at line 30 of file PolyhedralCone_Rn.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkTopologyAndGeometry()

virtual bool PolyhedralCone_Rn::checkTopologyAndGeometry ( bool  check_all = false) const
inlinevirtual

As stated by Komei Fukuda "the complexity of the polyhedral verification problem is unknown. Is it in P or in coNP-complete?" So only 3 verifications are made in Rn :

  • check all the generators are inside the H-representation
  • check that all generators have at least (n-1) facets in the case of a polyhedral cone (n for a polytope)
  • check that all facets have at least (n-1) generators in the case of a polyhedral cone (n for a polytope).

Definition at line 443 of file PolyhedralCone_Rn.h.

◆ checkVolumeEquality()

double PolyhedralCone_Rn::checkVolumeEquality ( const boost::shared_ptr< PolyhedralCone_Rn > &  B) const
inline

Definition at line 587 of file PolyhedralCone_Rn.h.

Here is the call graph for this function:

◆ computeDualPolyhedralCone()

boost::shared_ptr< PolyhedralCone_Rn > PolyhedralCone_Rn::computeDualPolyhedralCone ( ) const

Create the intersection edge in the truncating algorithm. It is defined by the intersection between a 2-face and a hyperplane, i.e. a (n-1)-face. The new egde is given by this formula where H is the current half space :

\[ newG = \displaystyle{\frac{\langle a, z \rangle}{\langle a, z-y \rangle} y - \frac{\langle a, y \rangle}{\langle a, z-y \rangle} z, H = \left\{ x : \langle a, x \rangle = \sum_{j=1}^n a_{j}x_j \geq 0 \right\}} \]

Parameters
yThe generator outside the current half-space \( \langle a, y \rangle < 0\)
zThe generator inside the current half-space \( \langle a, z \rangle > 0\)
newGThe new generator is the intersection between the 2-face created by y and z, and the current halfspace hyperplane
ayScalar product \( \langle a, y \rangle \)
azScalar product \( \langle a, z \rangle \)
bHalf-space constant, null in the polyhedral cone case.

Build the dual polyhedral cone of the current one whose edge are orthogonal to the primal and vice-versa.

Definition at line 304 of file PolyhedralCone_Rn.cpp.

Here is the call graph for this function:

◆ createBoundingBox()

virtual void PolyhedralCone_Rn::createBoundingBox ( double  )
inlinevirtual

At the moment this function is useless in the case of polyhedral cones.

Reimplemented in Polytope_Rn.

Definition at line 848 of file PolyhedralCone_Rn.h.

◆ createBoundingSimplex()

virtual void PolyhedralCone_Rn::createBoundingSimplex ( double  )
inlinevirtual

At the moment this function is useless in the case of polyhedral cones.

Reimplemented in Polytope_Rn.

Definition at line 851 of file PolyhedralCone_Rn.h.

◆ createTruncatedGenerator()

double PolyhedralCone_Rn::createTruncatedGenerator ( const boost::shared_ptr< Generator_Rn_SD > &  y,
const boost::shared_ptr< Generator_Rn_SD > &  z,
boost::shared_ptr< Generator_Rn_SD newG,
double  ay,
double  az,
double  b = 0. 
) const
virtual

Create the intersection edge in the truncating algorithm. It is defined by the intersection between a 2-face and a hyperplane, i.e. a (n-1)-face. The new egde is given by this formula where H is the current half space :

\[ newG = \displaystyle{\frac{\langle a, z \rangle}{\langle a, z-y \rangle} y - \frac{\langle a, y \rangle}{\langle a, z-y \rangle} z, H = \left\{ x : \langle a, x \rangle = \sum_{j=1}^n a_{j}x_j \geq 0 \right\}} \]

Parameters
yThe generator outside the current half-space \( \langle a, y \rangle < 0\)
zThe generator inside the current half-space \( \langle a, z \rangle > 0\)
newGThe new generator is the intersection between the 2-face created by y and z, and the current halfspace hyperplane
ayScalar product \( \langle a, y \rangle \)
azScalar product \( \langle a, z \rangle \)
bHalf-space constant, null in the polyhedral cone case.

Reimplemented in Polytope_Rn.

Definition at line 361 of file PolyhedralCone_Rn.cpp.

◆ dimension()

virtual unsigned int PolyhedralCone_Rn::dimension ( ) const
inlinevirtual

Return the space dimension.

Definition at line 65 of file PolyhedralCone_Rn.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dump()

void PolyhedralCone_Rn::dump ( std::ostream &  this_ostream) const
virtual

Dump the polyhedral structure on the stream passed as an argument.

Definition at line 224 of file PolyhedralCone_Rn.cpp.

Here is the call graph for this function:

◆ dumpScilab()

void PolyhedralCone_Rn::dumpScilab ( std::ostream &  this_ostream) const

Dump the generators on on the stream passed as an argument for outputting in Scilab.

Definition at line 279 of file PolyhedralCone_Rn.cpp.

Here is the call graph for this function:

◆ fillIrredundantNeighbourMatrix()

void PolyhedralCone_Rn::fillIrredundantNeighbourMatrix ( std::vector< std::vector< unsigned int > > &  neighboursA) const
inline

Compute and store all neighborhood relations between generators.

Parameters
neighboursAan array of arrays where each line models a generator and provide its neighbours.

Definition at line 402 of file PolyhedralCone_Rn.h.

Here is the call graph for this function:

◆ fillNeighbourMatrix()

void PolyhedralCone_Rn::fillNeighbourMatrix ( std::vector< std::vector< unsigned int > > &  neighboursA,
unsigned int  topologicalCode = 1 
) const
inline

Compute and store all neighborhood relations between generators.

Parameters
neighboursAa sparse matrix where each line models a generator
topologicalCodemodel the level of neighborhood: 1 for an edge, ..., (n-1) for a facet in a n-dimensional space

Definition at line 362 of file PolyhedralCone_Rn.h.

Here is the call graph for this function:

◆ getGenerator()

const boost::shared_ptr< Generator_Rn > & PolyhedralCone_Rn::getGenerator ( unsigned int  i) const

Return the i-th generator.

Definition at line 191 of file PolyhedralCone_Rn.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGeneratorNumber()

unsigned int PolyhedralCone_Rn::getGeneratorNumber ( boost::shared_ptr< Generator_Rn G) const

For a given generator, return its list index.

Definition at line 200 of file PolyhedralCone_Rn.cpp.

Here is the call graph for this function:

◆ getGeneratorsPerFacet()

void PolyhedralCone_Rn::getGeneratorsPerFacet ( std::vector< std::vector< unsigned int > > &  listOfGeneratorsPerFacet) const
inline

Get topological connections: for each facet, list its generators.

Definition at line 783 of file PolyhedralCone_Rn.h.

Here is the call graph for this function:

◆ getHalfSpace()

const boost::shared_ptr< HalfSpace_Rn > & PolyhedralCone_Rn::getHalfSpace ( unsigned int  i) const

Return the i-th half-space.

Definition at line 160 of file PolyhedralCone_Rn.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHalfSpaceNumber()

unsigned int PolyhedralCone_Rn::getHalfSpaceNumber ( const boost::shared_ptr< HalfSpace_Rn > &  F) const
inline

For a given half-space, return its list index.

Definition at line 112 of file PolyhedralCone_Rn.h.

◆ getListOfGenerators()

const listOfGeometricObjects< boost::shared_ptr<Generator_Rn> >& PolyhedralCone_Rn::getListOfGenerators ( ) const
inline

Return the list of generators.

Definition at line 155 of file PolyhedralCone_Rn.h.

Here is the caller graph for this function:

◆ getListOfGeneratorsSD()

unsigned int PolyhedralCone_Rn::getListOfGeneratorsSD ( std::vector< boost::shared_ptr< Generator_Rn_SD > > &  currentListOfGeneratorsSD) const
inline

Definition at line 157 of file PolyhedralCone_Rn.h.

Here is the call graph for this function:

◆ getListOfHalfSpaces() [1/2]

listOfGeometricObjects< boost::shared_ptr<HalfSpace_Rn> >& PolyhedralCone_Rn::getListOfHalfSpaces ( )
inline

Return the list of half-spaces.

Definition at line 131 of file PolyhedralCone_Rn.h.

Here is the caller graph for this function:

◆ getListOfHalfSpaces() [2/2]

const listOfGeometricObjects< boost::shared_ptr<HalfSpace_Rn> >& PolyhedralCone_Rn::getListOfHalfSpaces ( ) const
inline

Return the list of half-spaces.

Definition at line 134 of file PolyhedralCone_Rn.h.

◆ isBounded()

virtual bool PolyhedralCone_Rn::isBounded ( ) const
inlinevirtual

Tell whether this polyhedron is bounded or not, polyhedral cones are not.

Reimplemented in Polytope_Rn.

Definition at line 81 of file PolyhedralCone_Rn.h.

◆ isIncluded()

bool PolyhedralCone_Rn::isIncluded ( const boost::shared_ptr< PolyhedralCone_Rn > &  B) const

Test whether the current polytope V-description is inside the polytope B H-description.

Parameters
BThe H-polytope
Returns
true if

\[ this \subset B \]

, false otherwise.

Definition at line 395 of file PolyhedralCone_Rn.cpp.

Here is the call graph for this function:

◆ negate()

void PolyhedralCone_Rn::negate ( )
inline

Compute the symmetrical polyhedral cone.

Definition at line 806 of file PolyhedralCone_Rn.h.

◆ neigbourhoodCondition()

virtual unsigned int PolyhedralCone_Rn::neigbourhoodCondition ( ) const
inlinevirtual

Two edges are neighbours in a polyhedral cone <=> they share at least (n-2) facets.

Reimplemented in Polytope_Rn.

Definition at line 84 of file PolyhedralCone_Rn.h.

◆ numberOfGenerators()

unsigned int PolyhedralCone_Rn::numberOfGenerators ( ) const
inline

Give the total number of generators.

Definition at line 143 of file PolyhedralCone_Rn.h.

Here is the caller graph for this function:

◆ numberOfGeneratorsPerFacet()

virtual unsigned int PolyhedralCone_Rn::numberOfGeneratorsPerFacet ( ) const
inlinevirtual

Each facet in a polyhedral cone has got (n-1) edges.

Reimplemented in Polytope_Rn.

Definition at line 87 of file PolyhedralCone_Rn.h.

◆ numberOfHalfSpaces()

unsigned int PolyhedralCone_Rn::numberOfHalfSpaces ( ) const
inline

Get the total number of half-spaces.

Definition at line 95 of file PolyhedralCone_Rn.h.

Here is the caller graph for this function:

◆ relocateGenerators()

void PolyhedralCone_Rn::relocateGenerators ( )

Definition at line 411 of file PolyhedralCone_Rn.cpp.

Here is the call graph for this function:

◆ removeGenerator()

void PolyhedralCone_Rn::removeGenerator ( unsigned int  j)
inline

Remove the generator number j from its list.

Definition at line 671 of file PolyhedralCone_Rn.h.

◆ removeGenerators()

void PolyhedralCone_Rn::removeGenerators ( const std::set< boost::shared_ptr< Generator_Rn > > &  setToRemove)
inline

Remove the generators contained in setToRemove.

Definition at line 674 of file PolyhedralCone_Rn.h.

◆ removeHalfSpace()

void PolyhedralCone_Rn::removeHalfSpace ( unsigned int  j)
inline

Remove the half-space number j from its list.

Definition at line 104 of file PolyhedralCone_Rn.h.

Here is the caller graph for this function:

◆ removeHalfSpaceFromListAndGenerators()

void PolyhedralCone_Rn::removeHalfSpaceFromListAndGenerators ( const boost::shared_ptr< HalfSpace_Rn > &  hs)

Remove the half-space given as parameter from its list and from all generators.

Definition at line 169 of file PolyhedralCone_Rn.cpp.

Here is the call graph for this function:

◆ removeHalfSpaces()

void PolyhedralCone_Rn::removeHalfSpaces ( const std::set< boost::shared_ptr< HalfSpace_Rn > > &  setOfRedundantHS)
inline

Remove the half-space number j from its list.

Definition at line 107 of file PolyhedralCone_Rn.h.

◆ reset()

void PolyhedralCone_Rn::reset ( )
inline

Remove all half-spaces and generators.

Definition at line 90 of file PolyhedralCone_Rn.h.

◆ setListOfGenerators()

void PolyhedralCone_Rn::setListOfGenerators ( const listOfGeometricObjects< boost::shared_ptr< Generator_Rn > > &  gnList)
inline

Set a new list of generators.

Definition at line 218 of file PolyhedralCone_Rn.h.

◆ setListOfGeneratorsSD()

void PolyhedralCone_Rn::setListOfGeneratorsSD ( const std::vector< boost::shared_ptr< Generator_Rn_SD > > &  gnList)
inline

Set a new list of generators. The list of half-spaces should have been previously set.

Definition at line 179 of file PolyhedralCone_Rn.h.

Here is the call graph for this function:

◆ setListOfHalfSpaces()

void PolyhedralCone_Rn::setListOfHalfSpaces ( const listOfGeometricObjects< boost::shared_ptr< HalfSpace_Rn > > &  hsList)
inline

Set a new list of half-spaces.

Definition at line 137 of file PolyhedralCone_Rn.h.

Friends And Related Function Documentation

◆ constIteratorOfListOfHalfSpaces

friend class constIteratorOfListOfHalfSpaces
friend

Definition at line 49 of file PolyhedralCone_Rn.h.

◆ lexIteratorOfListOfHalfSpaces

friend class lexIteratorOfListOfHalfSpaces
friend

Definition at line 48 of file PolyhedralCone_Rn.h.

Member Data Documentation

◆ _listOfGenerators

listOfGeometricObjects< boost::shared_ptr<Generator_Rn> > PolyhedralCone_Rn::_listOfGenerators
protected

The convex hull of connected points.

Definition at line 858 of file PolyhedralCone_Rn.h.

◆ _listOfHalfSpaces

listOfGeometricObjects< boost::shared_ptr<HalfSpace_Rn> > PolyhedralCone_Rn::_listOfHalfSpaces
protected

The list of half-spaces defining the polyhedron.

Definition at line 856 of file PolyhedralCone_Rn.h.


The documentation for this class was generated from the following files: