politopix  5.0.0
TopGeomTools Class Reference

Basic tools for topology and geometry: translations, polarity, ... More...

#include <PolyhedralAlgorithms_Rn.h>

Collaboration diagram for TopGeomTools:
Collaboration graph

Static Public Member Functions

static int Translate (boost::shared_ptr< Polytope_Rn > &pol, const boost::numeric::ublas::vector< double > &v2t)
 Translate a polytope by the given vector. More...
 
static int GravityCenter (boost::shared_ptr< Polytope_Rn > &pol, boost::numeric::ublas::vector< double > &gravity_center)
 Compute the gravity center of a given polytope. More...
 
static int computeScalingFactorForInclusion (boost::shared_ptr< Polytope_Rn > &pol1, boost::shared_ptr< Polytope_Rn > &pol2, double &sfactor)
 Multiply a polytope pol1 is not included in in polytope pol2, compute the sclaing factor for pol2 to include pol1. More...
 
static int scalingFactor (boost::shared_ptr< Polytope_Rn > &pol, double sfactor)
 Multiply a polytope by a given real number. More...
 
static int scalingFactor (boost::shared_ptr< PolyhedralCone_Rn > &pol, double sfactor)
 Multiply a polyhedral cone by a given real number. More...
 
static int PolarPolytope (const boost::shared_ptr< Polytope_Rn > &original_pol, boost::shared_ptr< Polytope_Rn > &polar_pol, bool forceComputation=true, double bb_size=1000.)
 Compute the polar polytope. More...
 
static int projectPolytopeOnCanonicalHyperplanes (const std::set< unsigned int > &listOfHyperplanes, const boost::shared_ptr< Polytope_Rn > &original_pol, boost::shared_ptr< Polytope_Rn > &proj_pol)
 Compute the projection of a polytope on the intersection of canonical hyperplanes of the shape xi = 0 More...
 
static int extrudeInCanonicalDirections (const std::set< unsigned int > &originalSpaceDirections, unsigned int dimensionOfTotalSpace, const boost::shared_ptr< Polytope_Rn > &original_polytope, boost::shared_ptr< PolyhedralCone_Rn > &extruded_polyhedron)
 Compute the extrusion of a polytope belonging to a space S1 into a higher dimension space S2 following the canonical direction. More...
 

Detailed Description

Basic tools for topology and geometry: translations, polarity, ...

Definition at line 323 of file PolyhedralAlgorithms_Rn.h.

Member Function Documentation

◆ computeScalingFactorForInclusion()

int TopGeomTools::computeScalingFactorForInclusion ( boost::shared_ptr< Polytope_Rn > &  pol1,
boost::shared_ptr< Polytope_Rn > &  pol2,
double &  sfactor 
)
static

Multiply a polytope pol1 is not included in in polytope pol2, compute the sclaing factor for pol2 to include pol1.

Parameters
pol1The polytope which is not included into pol2
pol2The polytope to scale to contain pol1
sfactorThe scaling factor
Returns
TEST_OK or 0 if the process was successful, TEST_KO or -1 if something went wrong.

Definition at line 1283 of file PolyhedralAlgorithms_Rn.cpp.

Here is the call graph for this function:

◆ extrudeInCanonicalDirections()

int TopGeomTools::extrudeInCanonicalDirections ( const std::set< unsigned int > &  originalSpaceDirections,
unsigned int  dimensionOfTotalSpace,
const boost::shared_ptr< Polytope_Rn > &  original_polytope,
boost::shared_ptr< PolyhedralCone_Rn > &  extruded_polyhedron 
)
static

Compute the extrusion of a polytope belonging to a space S1 into a higher dimension space S2 following the canonical direction.

Parameters
originalSpaceDirectionsThe set of indices describing the space S1
original_polytopeThe input polytope
extruded_polyhedronThe unbounded output polyhedron
Returns
TEST_OK or 0 if the process was successful, TEST_KO or -1 if something went wrong.

Definition at line 1390 of file PolyhedralAlgorithms_Rn.cpp.

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

◆ GravityCenter()

int TopGeomTools::GravityCenter ( boost::shared_ptr< Polytope_Rn > &  pol,
boost::numeric::ublas::vector< double > &  gravity_center 
)
static

Compute the gravity center of a given polytope.

Parameters
polThe corresponding polytope
gravity_centerThe gravity center coordinates
Returns
TEST_OK or 0 if the process was successful, TEST_KO or -1 if something went wrong.

Definition at line 1268 of file PolyhedralAlgorithms_Rn.cpp.

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

◆ PolarPolytope()

int TopGeomTools::PolarPolytope ( const boost::shared_ptr< Polytope_Rn > &  original_pol,
boost::shared_ptr< Polytope_Rn > &  polar_pol,
bool  forceComputation = true,
double  bb_size = 1000. 
)
static

Compute the polar polytope.

Parameters
original_polThe input polytope
polar_polThe polar polytope
Returns
TEST_OK or 0 if the process was successful, TEST_KO or -1 if something went wrong.

Definition at line 1428 of file PolyhedralAlgorithms_Rn.cpp.

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

◆ projectPolytopeOnCanonicalHyperplanes()

int TopGeomTools::projectPolytopeOnCanonicalHyperplanes ( const std::set< unsigned int > &  listOfHyperplanes,
const boost::shared_ptr< Polytope_Rn > &  original_pol,
boost::shared_ptr< Polytope_Rn > &  proj_pol 
)
static

Compute the projection of a polytope on the intersection of canonical hyperplanes of the shape xi = 0

Parameters
listOfHyperplanesThe set of indices describing the canonical hyperplanes \( i \in listOfHyperplanes \Leftrightarrow x_i = 0 \)
original_polThe input polytope
proj_polThe projected polytope
Returns
TEST_OK or 0 if the process was successful, TEST_KO or -1 if something went wrong.

Definition at line 1343 of file PolyhedralAlgorithms_Rn.cpp.

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

◆ scalingFactor() [1/2]

int TopGeomTools::scalingFactor ( boost::shared_ptr< PolyhedralCone_Rn > &  pol,
double  sfactor 
)
static

Multiply a polyhedral cone by a given real number.

Parameters
polThe corresponding polyhedral cone
sfactorThe scaling factor
Returns
TEST_OK or 0 if the process was successful, TEST_KO or -1 if something went wrong.

Definition at line 1327 of file PolyhedralAlgorithms_Rn.cpp.

Here is the call graph for this function:

◆ scalingFactor() [2/2]

int TopGeomTools::scalingFactor ( boost::shared_ptr< Polytope_Rn > &  pol,
double  sfactor 
)
static

Multiply a polytope by a given real number.

Parameters
polThe corresponding polytope
sfactorThe scaling factor
Returns
TEST_OK or 0 if the process was successful, TEST_KO or -1 if something went wrong.

Definition at line 1311 of file PolyhedralAlgorithms_Rn.cpp.

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

◆ Translate()

int TopGeomTools::Translate ( boost::shared_ptr< Polytope_Rn > &  pol,
const boost::numeric::ublas::vector< double > &  v2t 
)
static

Translate a polytope by the given vector.

Parameters
polThe corresponding polytope
v2tThe translation vector
Returns
TEST_OK or 0 if the process was successful, TEST_KO or -1 if something went wrong.

Definition at line 1248 of file PolyhedralAlgorithms_Rn.cpp.

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

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