politopix  4.1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Generator_Rn_SD Class Reference

A n-coordinates generator for internal data structure. It can be a vertex or an edge whether it is embedded in a polytope or a polyhedral cone. It contains all of its support facets. More...

#include <Generator_Rn.h>

Collaboration diagram for Generator_Rn_SD:
Collaboration graph

Public Types

enum  Status {
  UNCHANGED, MODIFIED, CREATED, CREATED_AND_MODIFIED,
  DELETED, UNKNOWN
}
 

Public Member Functions

 Generator_Rn_SD (unsigned int n, unsigned int nb, Status st)
 Creates a n-coordinates generator. More...
 
 Generator_Rn_SD (const Generator_Rn_SD &gn)
 Copy constructor. More...
 
 Generator_Rn_SD (const Generator_Rn &gn, unsigned int nb, Status st)
 Constructor with a Generator_Rn. More...
 
 ~Generator_Rn_SD ()
 Destructor. More...
 
int dimension () const
 
boost::shared_ptr< Generator_RnmakeGenerator_Rn () const
 To make a Generator_Rn out of a Generator_Rn_SD. More...
 
void setCoordinate (unsigned int i, double val)
 
double getCoordinate (unsigned int i) const
 
void setGeneratorNumber (unsigned int gn)
 
unsigned int getGeneratorNumber () const
 
void setStatus (Status st)
 
Status getStatus () const
 
vector< double >::const_iterator begin () const
 
vector< double >::const_iterator end () const
 
const vector< double > & vect () const
 
void negate ()
 
bool isEqual1 (const boost::shared_ptr< Generator_Rn_SD > &gn, unsigned int RnDIM, double TOL2)
 
bool isEqual2 (const boost::shared_ptr< Generator_Rn_SD > &gn, unsigned int RnDIM, double TOL2)
 
void setFacet (unsigned int F)
 Insert a new support facet for the current generator. More...
 
void setAllFacets (const std::vector< unsigned int > &AF)
 Insert a new support facet for the current generator. More...
 
void importFacets (const std::set< unsigned int > &setOfFacets)
 Insert all facets stored in the argument. More...
 
void exportFacets (std::set< unsigned int > &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...
 
unsigned int getFacet (unsigned int i) const throw (std::out_of_range)
 Return the i-th facet number. More...
 
unsigned int getRawFacet (unsigned int i)
 Return the i-th facet. No check is performed! More...
 
bool isFacetInside (unsigned int F) const
 Check whether the given half-space is inside the generator's list. More...
 
void orderFacets ()
 
std::vector< unsigned int >
::const_iterator 
facetsBegin () const
 
std::vector< unsigned int >
::const_iterator 
facetsEnd () const
 
unsigned int numberOfFacets () const
 Return the total number of support faces. More...
 
void makeDiff (const boost::shared_ptr< Generator_Rn_SD > &gn1, const boost::shared_ptr< Generator_Rn_SD > &gn2)
 
void makeSum (const boost::shared_ptr< Generator_Rn_SD > &gn1, const boost::shared_ptr< Generator_Rn_SD > &gn2)
 
void makeCoefSum (const boost::shared_ptr< Generator_Rn_SD > &gn1, const boost::shared_ptr< Generator_Rn_SD > &gn2, double coef1, double coef2)
 
double getNormalDistance (const boost::shared_ptr< Generator_Rn_SD > &gn1, double coef, unsigned int RnDIM)
 
double normalize ()
 
double distanceFrom (const Generator_Rn_SD &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< unsigned int > _supportIntFacets
 Contain the list of all support facets. More...
 
unsigned int _generatorNumber
 The SD generator embeds its own number. More...
 
Status _status
 The SD generator embeds its status to trace the operations. More...
 

Friends

class Generator_Rn
 

Detailed Description

A n-coordinates generator for internal data structure. It can be a vertex or an edge whether it is embedded in a polytope or a polyhedral cone. It contains all of its support facets.

Definition at line 225 of file Generator_Rn.h.

Member Enumeration Documentation

Enumerator
UNCHANGED 
MODIFIED 
CREATED 
CREATED_AND_MODIFIED 
DELETED 
UNKNOWN 

Definition at line 230 of file Generator_Rn.h.

Constructor & Destructor Documentation

Generator_Rn_SD::Generator_Rn_SD ( unsigned int  n,
unsigned int  nb,
Status  st 
)
inline

Creates a n-coordinates generator.

Definition at line 245 of file Generator_Rn.h.

Generator_Rn_SD::Generator_Rn_SD ( const Generator_Rn_SD gn)
inline

Copy constructor.

Definition at line 248 of file Generator_Rn.h.

Generator_Rn_SD::Generator_Rn_SD ( const Generator_Rn gn,
unsigned int  nb,
Status  st 
)
inline

Constructor with a Generator_Rn.

Definition at line 254 of file Generator_Rn.h.

Generator_Rn_SD::~Generator_Rn_SD ( )
inline

Destructor.

Definition at line 259 of file Generator_Rn.h.

Member Function Documentation

vector<double>::const_iterator Generator_Rn_SD::begin ( ) const
inline

Definition at line 282 of file Generator_Rn.h.

int Generator_Rn_SD::dimension ( ) const
inline

Definition at line 261 of file Generator_Rn.h.

double Generator_Rn_SD::distanceFrom ( const Generator_Rn_SD P)
inline

Definition at line 410 of file Generator_Rn.h.

void Generator_Rn_SD::dump ( std::ostream &  this_ostream) const
inline

Definition at line 417 of file Generator_Rn.h.

Here is the call graph for this function:

vector<double>::const_iterator Generator_Rn_SD::end ( ) const
inline

Definition at line 284 of file Generator_Rn.h.

void Generator_Rn_SD::exportFacets ( std::set< unsigned int > &  setOfFacets) const
inline

Store all facets in a set.

Definition at line 330 of file Generator_Rn.h.

std::vector<unsigned int>::const_iterator Generator_Rn_SD::facetsBegin ( ) const
inline

Definition at line 370 of file Generator_Rn.h.

std::vector<unsigned int>::const_iterator Generator_Rn_SD::facetsEnd ( ) const
inline

Definition at line 372 of file Generator_Rn.h.

double Generator_Rn_SD::getCoordinate ( unsigned int  i) const
inline

Definition at line 272 of file Generator_Rn.h.

Here is the caller graph for this function:

unsigned int Generator_Rn_SD::getFacet ( unsigned int  i) const
throw (std::out_of_range
)
inline

Return the i-th facet number.

Definition at line 345 of file Generator_Rn.h.

Here is the call graph for this function:

unsigned int Generator_Rn_SD::getGeneratorNumber ( ) const
inline

Definition at line 276 of file Generator_Rn.h.

double Generator_Rn_SD::getNormalDistance ( const boost::shared_ptr< Generator_Rn_SD > &  gn1,
double  coef,
unsigned int  RnDIM 
)
inline

Return the square distance of the generator gn1 to the straight line defined by _coordinates and passing through the origin.

Definition at line 395 of file Generator_Rn.h.

unsigned int Generator_Rn_SD::getRawFacet ( unsigned int  i)
inline

Return the i-th facet. No check is performed!

Definition at line 356 of file Generator_Rn.h.

Status Generator_Rn_SD::getStatus ( ) const
inline

Definition at line 280 of file Generator_Rn.h.

void Generator_Rn_SD::importFacets ( const std::set< unsigned int > &  setOfFacets)
inline

Insert all facets stored in the argument.

Definition at line 321 of file Generator_Rn.h.

bool Generator_Rn_SD::isEqual1 ( const boost::shared_ptr< Generator_Rn_SD > &  gn,
unsigned int  RnDIM,
double  TOL2 
)
inline

Definition at line 290 of file Generator_Rn.h.

Here is the call graph for this function:

bool Generator_Rn_SD::isEqual2 ( const boost::shared_ptr< Generator_Rn_SD > &  gn,
unsigned int  RnDIM,
double  TOL2 
)
inline

Definition at line 302 of file Generator_Rn.h.

Here is the call graph for this function:

bool Generator_Rn_SD::isFacetInside ( unsigned int  F) const
inline

Check whether the given half-space is inside the generator's list.

Definition at line 359 of file Generator_Rn.h.

void Generator_Rn_SD::load ( std::istream &  this_istream)
inline

Definition at line 428 of file Generator_Rn.h.

Here is the call graph for this function:

void Generator_Rn_SD::makeCoefSum ( const boost::shared_ptr< Generator_Rn_SD > &  gn1,
const boost::shared_ptr< Generator_Rn_SD > &  gn2,
double  coef1,
double  coef2 
)
inline

Definition at line 385 of file Generator_Rn.h.

void Generator_Rn_SD::makeDiff ( const boost::shared_ptr< Generator_Rn_SD > &  gn1,
const boost::shared_ptr< Generator_Rn_SD > &  gn2 
)
inline

Definition at line 377 of file Generator_Rn.h.

boost::shared_ptr<Generator_Rn> Generator_Rn_SD::makeGenerator_Rn ( ) const
inline

To make a Generator_Rn out of a Generator_Rn_SD.

Definition at line 264 of file Generator_Rn.h.

void Generator_Rn_SD::makeSum ( const boost::shared_ptr< Generator_Rn_SD > &  gn1,
const boost::shared_ptr< Generator_Rn_SD > &  gn2 
)
inline

Definition at line 381 of file Generator_Rn.h.

void Generator_Rn_SD::negate ( )
inline

Definition at line 288 of file Generator_Rn.h.

double Generator_Rn_SD::normalize ( )
inline

Definition at line 404 of file Generator_Rn.h.

unsigned int Generator_Rn_SD::numberOfFacets ( ) const
inline

Return the total number of support faces.

Definition at line 375 of file Generator_Rn.h.

void Generator_Rn_SD::orderFacets ( )
inline

Definition at line 368 of file Generator_Rn.h.

void Generator_Rn_SD::removeFacet ( unsigned int  i)
throw (std::out_of_range,
std::domain_error
)
inline

Remove the i-th facet in list.

Definition at line 338 of file Generator_Rn.h.

void Generator_Rn_SD::save ( std::ostream &  this_ostream) const
inline

Definition at line 436 of file Generator_Rn.h.

Here is the call graph for this function:

void Generator_Rn_SD::setAllFacets ( const std::vector< unsigned int > &  AF)
inline

Insert a new support facet for the current generator.

Definition at line 318 of file Generator_Rn.h.

void Generator_Rn_SD::setCoordinate ( unsigned int  i,
double  val 
)
inline

Definition at line 270 of file Generator_Rn.h.

Here is the caller graph for this function:

void Generator_Rn_SD::setFacet ( unsigned int  F)
inline

Insert a new support facet for the current generator.

Definition at line 315 of file Generator_Rn.h.

void Generator_Rn_SD::setGeneratorNumber ( unsigned int  gn)
inline

Definition at line 274 of file Generator_Rn.h.

void Generator_Rn_SD::setStatus ( Status  st)
inline

Definition at line 278 of file Generator_Rn.h.

const vector<double>& Generator_Rn_SD::vect ( ) const
inline

Definition at line 286 of file Generator_Rn.h.

Friends And Related Function Documentation

friend class Generator_Rn
friend

Definition at line 226 of file Generator_Rn.h.

Member Data Documentation

vector<double> Generator_Rn_SD::_coordinates
protected

The set of coordinates.

Definition at line 446 of file Generator_Rn.h.

unsigned int Generator_Rn_SD::_generatorNumber
protected

The SD generator embeds its own number.

Definition at line 450 of file Generator_Rn.h.

Status Generator_Rn_SD::_status
protected

The SD generator embeds its status to trace the operations.

Definition at line 452 of file Generator_Rn.h.

std::vector< unsigned int > Generator_Rn_SD::_supportIntFacets
protected

Contain the list of all support facets.

Definition at line 448 of file Generator_Rn.h.


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