politopix
5.0.0
|
A n-coordinates generator, which can be a vertex or an edge whether it is contained by a polytope or a polyhedral cone. It contains all of its support facets. More...
#include <Generator_Rn.h>
Public Member Functions | |
Generator_Rn () | |
Create an empty generator. More... | |
Generator_Rn (unsigned int n) | |
Create a n-coordinates generator. More... | |
Generator_Rn (const Generator_Rn &gn) | |
Copy constructor. More... | |
~Generator_Rn () | |
Destructor. More... | |
int | dimension () const |
void | setCoordinate (unsigned int i, double val) |
double | getCoordinate (unsigned int i) const |
vector< double >::const_iterator | begin () const |
vector< double >::const_iterator | end () const |
const vector< double > & | vect () const |
void | setCoordinates (const vector< double > &vec) |
void | scalingFactor (double factor) |
void | negate () |
bool | isEqual1 (const boost::shared_ptr< Generator_Rn > &gn, unsigned int RnDIM, double TOL2) |
bool | isEqual2 (const boost::shared_ptr< Generator_Rn > &gn, unsigned int RnDIM, double TOL2) |
bool | isEqual2 (const Generator_Rn &gn, unsigned int RnDIM, double TOL2) |
void | clearFacets () |
Clear the list of facets. More... | |
void | switchFacets (const std::vector< boost::shared_ptr< HalfSpace_Rn > > &tab) |
Clear the list of facets. More... | |
void | setFacet (boost::shared_ptr< HalfSpace_Rn > F) |
Insert a new support facet for the current generator. More... | |
void | importFacets (const std::set< boost::shared_ptr< HalfSpace_Rn > > &setOfFacets) |
Insert all facets stored in the argument. More... | |
void | exportFacets (std::set< boost::shared_ptr< HalfSpace_Rn > > &setOfFacets) const |
Store all facets in a set. More... | |
void | removeFacet (unsigned int i) |
Remove the i-th facet in list. More... | |
boost::shared_ptr< HalfSpace_Rn > | getFacet (unsigned int i) const |
HalfSpace_Rn * | getRawFacet (unsigned int i) |
Return the i-th facet as a pointer for very fast comparisons. No check is performed! More... | |
bool | isFacetInside (boost::shared_ptr< HalfSpace_Rn > F) const |
Check whether the given half-space is inside the generator's list. More... | |
unsigned int | numberOfFacets () const |
Return the total number of support faces. More... | |
void | makeDiff (const boost::shared_ptr< Generator_Rn > &gn1, const boost::shared_ptr< Generator_Rn > &gn2) |
void | makeSum (const boost::shared_ptr< Generator_Rn > &gn1, const boost::shared_ptr< Generator_Rn > &gn2) |
void | makeCoefSum (const boost::shared_ptr< Generator_Rn > &gn1, const boost::shared_ptr< Generator_Rn > &gn2, double coef1, double coef2) |
double | getNormalDistance (const boost::shared_ptr< Generator_Rn > &gn1, double coef, unsigned int RnDIM) |
double | normalize () |
double | distanceFrom (const Generator_Rn &P) |
unsigned int | numberOfNeighbourGenerators () const |
void | clearNeighbourGenerators () |
boost::shared_ptr< Generator_Rn > | getNeighbourGenerator (unsigned int i) const |
void | setNeighbourGenerator (boost::shared_ptr< Generator_Rn > G) |
void | dump (std::ostream &this_ostream) const |
void | print () const |
void | load (std::istream &this_istream) |
void | save (std::ostream &this_ostream) const |
Protected Attributes | |
vector< double > | _coordinates |
The set of coordinates. More... | |
std::vector< boost::shared_ptr< HalfSpace_Rn > > | _supportFacets |
The list of all support facets. More... | |
std::vector< boost::shared_ptr< Generator_Rn > > | _neighbourGenerators |
The list of all the generator neighbours. More... | |
Friends | |
class | Generator_Rn_SD |
A n-coordinates generator, which can be a vertex or an edge whether it is contained by a polytope or a polyhedral cone. It contains all of its support facets.
Definition at line 39 of file Generator_Rn.h.
|
inline |
Create an empty generator.
Definition at line 44 of file Generator_Rn.h.
Generator_Rn::Generator_Rn | ( | unsigned int | n | ) |
Create a n-coordinates generator.
Definition at line 28 of file Generator_Rn.cpp.
|
inline |
Copy constructor.
Definition at line 50 of file Generator_Rn.h.
Generator_Rn::~Generator_Rn | ( | ) |
Destructor.
Definition at line 32 of file Generator_Rn.cpp.
|
inline |
Definition at line 64 of file Generator_Rn.h.
|
inline |
Clear the list of facets.
Definition at line 116 of file Generator_Rn.h.
|
inline |
Definition at line 216 of file Generator_Rn.h.
|
inline |
Definition at line 58 of file Generator_Rn.h.
|
inline |
Definition at line 204 of file Generator_Rn.h.
|
inline |
|
inline |
Definition at line 66 of file Generator_Rn.h.
|
inline |
Store all facets in a set.
Definition at line 137 of file Generator_Rn.h.
|
inline |
|
inline |
Return the i-th facet. The user has to check validity of the returned smart pointer.
Definition at line 149 of file Generator_Rn.h.
|
inline |
|
inline |
Return the square distance of the generator gn1 to the straight line defined by _coordinates and passing through the origin.
Definition at line 189 of file Generator_Rn.h.
|
inline |
Return the i-th facet as a pointer for very fast comparisons. No check is performed!
Definition at line 160 of file Generator_Rn.h.
|
inline |
Insert all facets stored in the argument.
Definition at line 128 of file Generator_Rn.h.
|
inline |
|
inline |
|
inline |
bool Generator_Rn::isFacetInside | ( | boost::shared_ptr< HalfSpace_Rn > | F | ) | const |
Check whether the given half-space is inside the generator's list.
Definition at line 50 of file Generator_Rn.cpp.
|
inline |
|
inline |
Definition at line 179 of file Generator_Rn.h.
|
inline |
Definition at line 171 of file Generator_Rn.h.
|
inline |
Definition at line 175 of file Generator_Rn.h.
|
inline |
Definition at line 74 of file Generator_Rn.h.
|
inline |
Definition at line 198 of file Generator_Rn.h.
|
inline |
Return the total number of support faces.
Definition at line 166 of file Generator_Rn.h.
|
inline |
Definition at line 214 of file Generator_Rn.h.
|
inline |
Definition at line 244 of file Generator_Rn.h.
void Generator_Rn::removeFacet | ( | unsigned int | i | ) |
Remove the i-th facet in list.
Definition at line 35 of file Generator_Rn.cpp.
|
inline |
|
inline |
Definition at line 72 of file Generator_Rn.h.
|
inline |
|
inline |
Definition at line 70 of file Generator_Rn.h.
|
inline |
Insert a new support facet for the current generator.
Definition at line 125 of file Generator_Rn.h.
|
inline |
Definition at line 228 of file Generator_Rn.h.
|
inline |
Clear the list of facets.
Definition at line 119 of file Generator_Rn.h.
|
inline |
Definition at line 68 of file Generator_Rn.h.
|
friend |
Definition at line 40 of file Generator_Rn.h.
|
protected |
The set of coordinates.
Definition at line 267 of file Generator_Rn.h.
|
protected |
The list of all the generator neighbours.
Definition at line 271 of file Generator_Rn.h.
|
protected |
The list of all support facets.
Definition at line 269 of file Generator_Rn.h.