politopix
4.1.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 (unsigned int n) | |
Creates 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 | 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) |
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) throw (std::out_of_range,std::domain_error) |
Remove the i-th facet in list. More... | |
boost::shared_ptr< HalfSpace_Rn > | getFacet (unsigned int i) const throw (std::out_of_range) |
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) |
void | dump (std::ostream &this_ostream) 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 |
Contain the list of all support facets. 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 38 of file Generator_Rn.h.
Generator_Rn::Generator_Rn | ( | unsigned int | n | ) |
Creates a n-coordinates generator.
Definition at line 28 of file Generator_Rn.cpp.
|
inline |
Copy constructor.
Definition at line 46 of file Generator_Rn.h.
Generator_Rn::~Generator_Rn | ( | ) |
Destructor.
Definition at line 32 of file Generator_Rn.cpp.
|
inline |
Definition at line 60 of file Generator_Rn.h.
|
inline |
Clear the list of facets.
Definition at line 95 of file Generator_Rn.h.
|
inline |
Definition at line 54 of file Generator_Rn.h.
|
inline |
Definition at line 180 of file Generator_Rn.h.
|
inline |
|
inline |
Definition at line 62 of file Generator_Rn.h.
|
inline |
Store all facets in a set.
Definition at line 116 of file Generator_Rn.h.
|
inline |
Definition at line 58 of file Generator_Rn.h.
|
inline |
Return the i-th facet. The user has to check validity of the returned smart pointer.
Definition at line 128 of file Generator_Rn.h.
|
inline |
Return the square distance of the generator gn1 to the straight line defined by _coordinates and passing through the origin.
Definition at line 165 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 139 of file Generator_Rn.h.
|
inline |
Insert all facets stored in the argument.
Definition at line 107 of file Generator_Rn.h.
|
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 155 of file Generator_Rn.h.
|
inline |
Definition at line 147 of file Generator_Rn.h.
|
inline |
Definition at line 151 of file Generator_Rn.h.
|
inline |
Definition at line 68 of file Generator_Rn.h.
|
inline |
Definition at line 174 of file Generator_Rn.h.
|
inline |
Return the total number of support faces.
Definition at line 145 of file Generator_Rn.h.
void Generator_Rn::removeFacet | ( | unsigned int | i | ) | |
throw | ( | std::out_of_range, | |||
std::domain_error | |||||
) |
Remove the i-th facet in list.
Definition at line 35 of file Generator_Rn.cpp.
|
inline |
|
inline |
Definition at line 56 of file Generator_Rn.h.
|
inline |
Definition at line 66 of file Generator_Rn.h.
|
inline |
Insert a new support facet for the current generator.
Definition at line 104 of file Generator_Rn.h.
|
inline |
Clear the list of facets.
Definition at line 98 of file Generator_Rn.h.
|
inline |
Definition at line 64 of file Generator_Rn.h.
|
friend |
Definition at line 39 of file Generator_Rn.h.
|
protected |
The set of coordinates.
Definition at line 216 of file Generator_Rn.h.
|
protected |
Contain the list of all support facets.
Definition at line 218 of file Generator_Rn.h.