politopix  5.0.0
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 ()
 
const std::vector< std::vector< ListOfFaces > > & getFacesWithFacets ()
 
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)
 Load the polytope lattice. More...
 
static void load (std::istream &this_stream, std::vector< std::vector< ListOfFaces > > &latt)
 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::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

◆ clear()

void FaceEnumeration::clear ( )
inline

Definition at line 89 of file PolyhedralAlgorithms_Rn.h.

◆ Compute() [1/2]

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 43 of file PolyhedralAlgorithms_Rn.cpp.

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

◆ Compute() [2/2]

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

Definition at line 49 of file PolyhedralAlgorithms_Rn.cpp.

Here is the call graph for this function:

◆ ComputeWithFacets()

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

Definition at line 54 of file PolyhedralAlgorithms_Rn.cpp.

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

◆ ComputeWithVertices()

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

Definition at line 127 of file PolyhedralAlgorithms_Rn.cpp.

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

◆ getFacesWithFacets()

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

Definition at line 83 of file PolyhedralAlgorithms_Rn.h.

◆ getFacesWithVertices()

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

Definition at line 77 of file PolyhedralAlgorithms_Rn.h.

◆ load() [1/2]

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

Load the polytope lattice.

Definition at line 261 of file PolyhedralAlgorithms_Rn.cpp.

Here is the caller graph for this function:

◆ load() [2/2]

void FaceEnumeration::load ( std::istream &  this_stream,
std::vector< std::vector< ListOfFaces > > &  latt 
)
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 285 of file PolyhedralAlgorithms_Rn.cpp.

◆ printFacesWithFacets()

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

Definition at line 176 of file PolyhedralAlgorithms_Rn.cpp.

◆ printFacesWithVertices()

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

Definition at line 201 of file PolyhedralAlgorithms_Rn.cpp.

◆ printFacesWithVerticesToSage()

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

Definition at line 226 of file PolyhedralAlgorithms_Rn.cpp.

◆ save() [1/3]

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

Save the polytope lattice.

Definition at line 273 of file PolyhedralAlgorithms_Rn.cpp.

◆ save() [2/3]

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

Definition at line 119 of file PolyhedralAlgorithms_Rn.h.

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

◆ save() [3/3]

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 318 of file PolyhedralAlgorithms_Rn.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _allFacesWithFacets

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

Definition at line 127 of file PolyhedralAlgorithms_Rn.h.

◆ _allFacesWithVertices

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

Definition at line 129 of file PolyhedralAlgorithms_Rn.h.

◆ _polytope

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

Definition at line 131 of file PolyhedralAlgorithms_Rn.h.


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