politopix  5.0.0
HalfSpace_Rn Class Reference

A half-space whose frontier is a linear (n-1) dimension space.
_constant + _coefficients[0].x1 + ... + _coefficients[n-1].xn >= 0. More...

#include <HalfSpace_Rn.h>

Inheritance diagram for HalfSpace_Rn:
Inheritance graph
Collaboration diagram for HalfSpace_Rn:
Collaboration graph

Public Types

enum  State {
  hs_ON = 0, hs_IN = 1, hs_OUT = 2, hs_UNKNOWN = 3,
  hs_IN_OR_OUT = 4, hs_OUT_TO_ON = 5
}
 

Public Member Functions

 HalfSpace_Rn ()
 Constructor. More...
 
 HalfSpace_Rn (unsigned int n)
 
virtual ~HalfSpace_Rn ()
 
void setCoefficients (const vector< double > &vec)
 
double getCoefficient (unsigned int i) const
 
void setCoefficient (unsigned int i, double c)
 
void setConstant (double c)
 
double getConstant () const
 
void negate ()
 
int dimension () const
 
std::string getSideAsText () const
 
boost::numeric::ublas::vector< double >::const_iterator begin () const
 
boost::numeric::ublas::vector< double >::const_iterator end () const
 
const boost::numeric::ublas::vector< double > & vect () const
 
double computeDistancePointHyperplane (const boost::numeric::ublas::vector< double > &thisPoint) const
 
double computeDistancePointHyperplane (const boost::numeric::ublas::vector< double > &thisPoint, double halfSpaceNorm) const
 
double computeDistancePointHyperplane (const boost::numeric::ublas::vector< double > &thisPoint, boost::numeric::ublas::vector< double > &projectedPoint, double halfSpaceNorm) const
 
virtual void dump (std::ostream &this_ostream) const
 
void print () const
 
virtual bool testEmptyness (const std::vector< boost::shared_ptr< Generator_Rn_SD > > &GN_IN, const std::vector< boost::shared_ptr< Generator_Rn_SD > > &GN_OUT, const std::vector< boost::shared_ptr< Generator_Rn_SD > > &GN_ON)
 Specific to the double description algorithm Test whether an intersection with a half-space has generated an empty set or not. More...
 
virtual bool testEmptyness (unsigned int GN_IN, unsigned int GN_OUT, unsigned int GN_ON)
 Specific to the double description algorithm Test whether an intersection with a half-space has generated an empty set or not. More...
 
virtual void noGeneratorsOUT (std::vector< boost::shared_ptr< Generator_Rn_SD > > &listOfGeneratorSD, const std::vector< boost::shared_ptr< Generator_Rn_SD > > &GN_ON)
 Specific to the double description algorithm When chopping a polyhedral body with a hyperplane, if the set of generators OUT is empty, only keep the generators ON and ignore the generators IN. In the case of a half-space, keep things unchanged i.e. listOfGeneratorSD = GN_IN + GN_ON. More...
 
virtual void prepareSetOfGenerators (std::vector< boost::shared_ptr< Generator_Rn_SD > > &GN_IN, std::vector< boost::shared_ptr< Generator_Rn_SD > > &GN_OUT)
 Specific to the double description algorithm When chopping a polyhedral body with a hyperplane, if the set of generators OUT is empty, only keep the generators ON and ignore the generators IN. In the case of a half-space, keep things unchanged i.e. listOfGeneratorSD = GN_IN + GN_ON. More...
 

Static Public Member Functions

static std::string getStateAsText (const HalfSpace_Rn::State &)
 

Protected Attributes

boost::numeric::ublas::vector< double > _coefficients
 The normal vector. More...
 
double _constant
 The second member constant. More...
 

Detailed Description

A half-space whose frontier is a linear (n-1) dimension space.
_constant + _coefficients[0].x1 + ... + _coefficients[n-1].xn >= 0.

Definition at line 40 of file HalfSpace_Rn.h.

Member Enumeration Documentation

◆ State

Enumerator
hs_ON 
hs_IN 
hs_OUT 
hs_UNKNOWN 
hs_IN_OR_OUT 
hs_OUT_TO_ON 

Definition at line 44 of file HalfSpace_Rn.h.

Constructor & Destructor Documentation

◆ HalfSpace_Rn() [1/2]

HalfSpace_Rn::HalfSpace_Rn ( )
inline

Constructor.

Definition at line 53 of file HalfSpace_Rn.h.

◆ HalfSpace_Rn() [2/2]

HalfSpace_Rn::HalfSpace_Rn ( unsigned int  n)

Definition at line 30 of file HalfSpace_Rn.cpp.

◆ ~HalfSpace_Rn()

virtual HalfSpace_Rn::~HalfSpace_Rn ( )
inlinevirtual

Definition at line 57 of file HalfSpace_Rn.h.

Member Function Documentation

◆ begin()

boost::numeric::ublas::vector<double>::const_iterator HalfSpace_Rn::begin ( ) const
inline

Definition at line 75 of file HalfSpace_Rn.h.

◆ computeDistancePointHyperplane() [1/3]

double HalfSpace_Rn::computeDistancePointHyperplane ( const boost::numeric::ublas::vector< double > &  thisPoint) const
inline

Definition at line 83 of file HalfSpace_Rn.h.

◆ computeDistancePointHyperplane() [2/3]

double HalfSpace_Rn::computeDistancePointHyperplane ( const boost::numeric::ublas::vector< double > &  thisPoint,
boost::numeric::ublas::vector< double > &  projectedPoint,
double  halfSpaceNorm 
) const
inline

Definition at line 97 of file HalfSpace_Rn.h.

◆ computeDistancePointHyperplane() [3/3]

double HalfSpace_Rn::computeDistancePointHyperplane ( const boost::numeric::ublas::vector< double > &  thisPoint,
double  halfSpaceNorm 
) const
inline

Definition at line 91 of file HalfSpace_Rn.h.

◆ dimension()

int HalfSpace_Rn::dimension ( ) const
inline

Definition at line 71 of file HalfSpace_Rn.h.

◆ dump()

virtual void HalfSpace_Rn::dump ( std::ostream &  this_ostream) const
inlinevirtual

Reimplemented in Hyperplane_Rn.

Definition at line 107 of file HalfSpace_Rn.h.

◆ end()

boost::numeric::ublas::vector<double>::const_iterator HalfSpace_Rn::end ( ) const
inline

Definition at line 77 of file HalfSpace_Rn.h.

◆ getCoefficient()

double HalfSpace_Rn::getCoefficient ( unsigned int  i) const

Definition at line 33 of file HalfSpace_Rn.cpp.

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

◆ getConstant()

double HalfSpace_Rn::getConstant ( ) const
inline

Definition at line 67 of file HalfSpace_Rn.h.

Here is the caller graph for this function:

◆ getSideAsText()

std::string HalfSpace_Rn::getSideAsText ( ) const
inline

Definition at line 73 of file HalfSpace_Rn.h.

◆ getStateAsText()

std::string HalfSpace_Rn::getStateAsText ( const HalfSpace_Rn::State state)
static

Definition at line 55 of file HalfSpace_Rn.cpp.

Here is the caller graph for this function:

◆ negate()

void HalfSpace_Rn::negate ( )
inline

Definition at line 69 of file HalfSpace_Rn.h.

◆ noGeneratorsOUT()

virtual void HalfSpace_Rn::noGeneratorsOUT ( std::vector< boost::shared_ptr< Generator_Rn_SD > > &  listOfGeneratorSD,
const std::vector< boost::shared_ptr< Generator_Rn_SD > > &  GN_ON 
)
inlinevirtual

Specific to the double description algorithm When chopping a polyhedral body with a hyperplane, if the set of generators OUT is empty, only keep the generators ON and ignore the generators IN. In the case of a half-space, keep things unchanged i.e. listOfGeneratorSD = GN_IN + GN_ON.

Reimplemented in Hyperplane_Rn.

Definition at line 143 of file HalfSpace_Rn.h.

◆ prepareSetOfGenerators()

virtual void HalfSpace_Rn::prepareSetOfGenerators ( std::vector< boost::shared_ptr< Generator_Rn_SD > > &  GN_IN,
std::vector< boost::shared_ptr< Generator_Rn_SD > > &  GN_OUT 
)
inlinevirtual

Specific to the double description algorithm When chopping a polyhedral body with a hyperplane, if the set of generators OUT is empty, only keep the generators ON and ignore the generators IN. In the case of a half-space, keep things unchanged i.e. listOfGeneratorSD = GN_IN + GN_ON.

Specific to the double description algorithm In the other case of an intersection with a half-space this function does nothing.

Reimplemented in Hyperplane_Rn.

Definition at line 158 of file HalfSpace_Rn.h.

◆ print()

void HalfSpace_Rn::print ( ) const
inline

Definition at line 118 of file HalfSpace_Rn.h.

Here is the caller graph for this function:

◆ setCoefficient()

void HalfSpace_Rn::setCoefficient ( unsigned int  i,
double  c 
)

Definition at line 44 of file HalfSpace_Rn.cpp.

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

◆ setCoefficients()

void HalfSpace_Rn::setCoefficients ( const vector< double > &  vec)
inline

Definition at line 59 of file HalfSpace_Rn.h.

◆ setConstant()

void HalfSpace_Rn::setConstant ( double  c)
inline

Definition at line 65 of file HalfSpace_Rn.h.

Here is the caller graph for this function:

◆ testEmptyness() [1/2]

virtual bool HalfSpace_Rn::testEmptyness ( const std::vector< boost::shared_ptr< Generator_Rn_SD > > &  GN_IN,
const std::vector< boost::shared_ptr< Generator_Rn_SD > > &  GN_OUT,
const std::vector< boost::shared_ptr< Generator_Rn_SD > > &  GN_ON 
)
inlinevirtual

Specific to the double description algorithm Test whether an intersection with a half-space has generated an empty set or not.

Reimplemented in Hyperplane_Rn.

Definition at line 125 of file HalfSpace_Rn.h.

◆ testEmptyness() [2/2]

virtual bool HalfSpace_Rn::testEmptyness ( unsigned int  GN_IN,
unsigned int  GN_OUT,
unsigned int  GN_ON 
)
inlinevirtual

Specific to the double description algorithm Test whether an intersection with a half-space has generated an empty set or not.

Reimplemented in Hyperplane_Rn.

Definition at line 134 of file HalfSpace_Rn.h.

◆ vect()

const boost::numeric::ublas::vector<double>& HalfSpace_Rn::vect ( ) const
inline

Definition at line 79 of file HalfSpace_Rn.h.

Here is the caller graph for this function:

Member Data Documentation

◆ _coefficients

boost::numeric::ublas::vector<double> HalfSpace_Rn::_coefficients
protected

The normal vector.

Definition at line 165 of file HalfSpace_Rn.h.

◆ _constant

double HalfSpace_Rn::_constant
protected

The second member constant.

Definition at line 167 of file HalfSpace_Rn.h.


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