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

Combinatorial face enumeration for polytopes. More...

#include <PolyhedralAlgorithms_Rn.h>

Collaboration diagram for FaceEnumeration:
Collaboration graph

Public Member Functions

 FaceEnumeration (const boost::shared_ptr< Polytope_Rn > &A)
 General Face Enumeration Algorithm. More...
 
const std::vector< std::vector
< ListOfFaces > > & 
getFacesWithVertices () throw (std::domain_error)
 
const std::vector< std::vector
< ListOfFaces > > & 
getFacesWithFacets () throw (std::domain_error)
 
void clear ()
 
void printFacesWithVerticesToSage (std::ostream &this_ostream) const
 
void printFacesWithVertices (std::ostream &this_ostream) const
 
void printFacesWithFacets (std::ostream &this_ostream) const
 
void save (std::ostream &this_stream) const
 

Static Public Member Functions

static void Compute (const boost::shared_ptr< Polytope_Rn > &A)
 
static void Compute (const boost::shared_ptr< Polytope_Rn > &A, FaceEnumeration &FE)
 
static void save (const std::string &filename, const std::vector< std::vector< ListOfFaces > > &latt)
 Save the polytope lattice. More...
 
static void load (const std::string &filename, std::vector< std::vector< ListOfFaces > > &latt) throw (std::ios_base::failure)
 Load the polytope lattice. More...
 
static void load (std::istream &this_stream, std::vector< std::vector< ListOfFaces > > &latt) throw (std::out_of_range)
 Load the polytope lattice 1st line : comments = "# SpaceDimension NumberOfHalfspaces"
2nd line : SpaceDimension TotalNumberOfFaces
3rd line : FiDimension k V1 ... Vk
4th line : FjDimension l Vu ... V(u+l)
k-th line : ...
More...
 
static void save (std::ostream &this_stream, const std::vector< std::vector< ListOfFaces > > &latt)
 Save the polytope lattice 1st line : comments = "# SpaceDimension NumberOfHalfspaces"
2nd line : SpaceDimension TotalNumberOfFaces
3rd line : FiDimension k V1 ... Vk
4th line : FjDimension l Vu ... V(u+l)
k-th line : ...
More...
 

Static Protected Member Functions

static void ComputeWithFacets (const boost::shared_ptr< Polytope_Rn > &A, FaceEnumeration &FaceEnum)
 
static void ComputeWithVertices (const boost::shared_ptr< Polytope_Rn > &A, FaceEnumeration &FaceEnum)
 

Protected Attributes

std::vector< std::vector
< ListOfFaces > > 
_allFacesWithFacets
 
std::vector< std::vector
< ListOfFaces > > 
_allFacesWithVertices
 
const boost::shared_ptr
< Polytope_Rn > & 
_polytope
 

Detailed Description

Combinatorial face enumeration for polytopes.

Definition at line 44 of file PolyhedralAlgorithms_Rn.h.

Constructor & Destructor Documentation

FaceEnumeration::FaceEnumeration ( const boost::shared_ptr< Polytope_Rn > &  A)
inline

General Face Enumeration Algorithm.

Definition at line 49 of file PolyhedralAlgorithms_Rn.h.

Member Function Documentation

void FaceEnumeration::clear ( )
inline

Definition at line 89 of file PolyhedralAlgorithms_Rn.h.

void FaceEnumeration::Compute ( const boost::shared_ptr< Polytope_Rn > &  A)
static

General Face Enumeration Algorithm from Combinatorial face enumeration in convex polytopes (1994) by Komei Fukuda and Vera Rosta.
Input: the set $ \mathcal{P}_0 $ of vertices of a polytope P.
Output: the set $ \mathcal{P} $ of vertices of a polytope P.
procedure FaceEnumeration( $ \mathcal{P}_0 $: vertices)
Create a binary tree T with set of leaves $ \mathcal{P}_0 $
k=0; f0 = $ | \mathcal{P}_0 | $; $ \mathcal{P}_{(0)} = \mathcal{P}_0 $
WHILE fk >= 2 DO
    fk+1 = 0 ; $ \mathcal{P}_{(k+1)} = \emptyset $
    FOREACH pair (F, F') in $ \mathcal{P}_{(k)} $ DO
        $ F'' = F \cap F' $
        IF $ F'' \notin T $ THEN
            IF $ F''== F $ or $ F''== F' $ THEN
                Delete F'' from $ \mathcal{P}_{(k)} $;
                fk = fk - 1
            ENDIF
            Add F'' to T and to $ \mathcal{P}_{(k+1)} $
            fk+1 = fk+1 + 1
        ENDIF
    ENDFOR
    Output $ \mathcal{P}_{(k)} $; k=k+1
ENDWHILE

Definition at line 40 of file PolyhedralAlgorithms_Rn.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FaceEnumeration::Compute ( const boost::shared_ptr< Polytope_Rn > &  A,
FaceEnumeration FE 
)
static

Definition at line 46 of file PolyhedralAlgorithms_Rn.cpp.

Here is the call graph for this function:

void FaceEnumeration::ComputeWithFacets ( const boost::shared_ptr< Polytope_Rn > &  A,
FaceEnumeration FaceEnum 
)
staticprotected

Definition at line 51 of file PolyhedralAlgorithms_Rn.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FaceEnumeration::ComputeWithVertices ( const boost::shared_ptr< Polytope_Rn > &  A,
FaceEnumeration FaceEnum 
)
staticprotected

Definition at line 124 of file PolyhedralAlgorithms_Rn.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const std::vector< std::vector< ListOfFaces > >& FaceEnumeration::getFacesWithFacets ( )
throw (std::domain_error
)
inline

Definition at line 83 of file PolyhedralAlgorithms_Rn.h.

const std::vector< std::vector< ListOfFaces > >& FaceEnumeration::getFacesWithVertices ( )
throw (std::domain_error
)
inline

Definition at line 77 of file PolyhedralAlgorithms_Rn.h.

Here is the caller graph for this function:

void FaceEnumeration::load ( const std::string &  filename,
std::vector< std::vector< ListOfFaces > > &  latt 
)
throw (std::ios_base::failure
)
static

Load the polytope lattice.

Definition at line 262 of file PolyhedralAlgorithms_Rn.cpp.

Here is the caller graph for this function:

void FaceEnumeration::load ( std::istream &  this_stream,
std::vector< std::vector< ListOfFaces > > &  latt 
)
throw (std::out_of_range
)
static

Load the polytope lattice 1st line : comments = "# SpaceDimension NumberOfHalfspaces"
2nd line : SpaceDimension TotalNumberOfFaces
3rd line : FiDimension k V1 ... Vk
4th line : FjDimension l Vu ... V(u+l)
k-th line : ...

Definition at line 287 of file PolyhedralAlgorithms_Rn.cpp.

void FaceEnumeration::printFacesWithFacets ( std::ostream &  this_ostream) const

Definition at line 173 of file PolyhedralAlgorithms_Rn.cpp.

void FaceEnumeration::printFacesWithVertices ( std::ostream &  this_ostream) const

Definition at line 198 of file PolyhedralAlgorithms_Rn.cpp.

void FaceEnumeration::printFacesWithVerticesToSage ( std::ostream &  this_ostream) const

Definition at line 223 of file PolyhedralAlgorithms_Rn.cpp.

void FaceEnumeration::save ( const std::string &  filename,
const std::vector< std::vector< ListOfFaces > > &  latt 
)
static

Save the polytope lattice.

Definition at line 275 of file PolyhedralAlgorithms_Rn.cpp.

void FaceEnumeration::save ( std::ostream &  this_stream,
const std::vector< std::vector< ListOfFaces > > &  latt 
)
static

Save the polytope lattice 1st line : comments = "# SpaceDimension NumberOfHalfspaces"
2nd line : SpaceDimension TotalNumberOfFaces
3rd line : FiDimension k V1 ... Vk
4th line : FjDimension l Vu ... V(u+l)
k-th line : ...

Definition at line 321 of file PolyhedralAlgorithms_Rn.cpp.

Here is the call graph for this function:

void FaceEnumeration::save ( std::ostream &  this_stream) const
inline

Definition at line 121 of file PolyhedralAlgorithms_Rn.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

std::vector< std::vector< ListOfFaces > > FaceEnumeration::_allFacesWithFacets
protected

Definition at line 129 of file PolyhedralAlgorithms_Rn.h.

std::vector< std::vector< ListOfFaces > > FaceEnumeration::_allFacesWithVertices
protected

Definition at line 131 of file PolyhedralAlgorithms_Rn.h.

const boost::shared_ptr<Polytope_Rn>& FaceEnumeration::_polytope
protected

Definition at line 133 of file PolyhedralAlgorithms_Rn.h.


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