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

Read/write polytopes.
The way we store polytopes :
1st line : comments = "# Dimension NumberOfHalfspaces NumberOfGenerators"
2nd line : cartesian_space_dimension number_of_facets number_of_generators
3rd line : comments = "# HALFSPACES : a0 + a1.x1 + ... + an.xn >= 0."
4th line : a00 a10 ... an0
k-th line : a0k a1k ... ank
(k+1)-th line : comments = "# GENERATORS : V = (v1, ..., vn)"
(k+2)-th line : v11 ... v1n
l-th line : vl1 ... vln
(l+1)-th line : comments = "# FACETS PER GENERATOR : {Fi1, Fi2, ...}"
(l+2)-th line the neigh : Fr ... Fs
m-th line : Fs ... Ft
If (number_of_vertices == 0) then compute the vertices from the
facets including the polytope into a huge cube containing it.
In this case the blocks "GENERATORS" and "FACETS PER GENERATOR" are ignored. More...

#include <IO_Polytope.h>

Collaboration diagram for IO_Polytope:
Collaboration graph

Public Member Functions

 IO_Polytope ()
 
 ~IO_Polytope ()
 

Static Public Member Functions

static polito_EXPORT void load (const std::string &filename, boost::shared_ptr< PolyhedralCone_Rn > POLY) throw (std::ios_base::failure,std::out_of_range)
 Load the main data format to store polytopes. More...
 
static polito_EXPORT void save (const std::string &filename, boost::shared_ptr< PolyhedralCone_Rn > POLY) throw (std::ios_base::failure)
 Save the polytope to the main data format. More...
 

Detailed Description

Read/write polytopes.
The way we store polytopes :
1st line : comments = "# Dimension NumberOfHalfspaces NumberOfGenerators"
2nd line : cartesian_space_dimension number_of_facets number_of_generators
3rd line : comments = "# HALFSPACES : a0 + a1.x1 + ... + an.xn >= 0."
4th line : a00 a10 ... an0
k-th line : a0k a1k ... ank
(k+1)-th line : comments = "# GENERATORS : V = (v1, ..., vn)"
(k+2)-th line : v11 ... v1n
l-th line : vl1 ... vln
(l+1)-th line : comments = "# FACETS PER GENERATOR : {Fi1, Fi2, ...}"
(l+2)-th line the neigh : Fr ... Fs
m-th line : Fs ... Ft
If (number_of_vertices == 0) then compute the vertices from the
facets including the polytope into a huge cube containing it.
In this case the blocks "GENERATORS" and "FACETS PER GENERATOR" are ignored.

Definition at line 50 of file IO_Polytope.h.

Constructor & Destructor Documentation

IO_Polytope::IO_Polytope ( )
inline

Definition at line 53 of file IO_Polytope.h.

IO_Polytope::~IO_Polytope ( )
inline

Definition at line 55 of file IO_Polytope.h.

Member Function Documentation

void IO_Polytope::load ( const std::string &  filename,
boost::shared_ptr< PolyhedralCone_Rn POLY 
)
throw (std::ios_base::failure,
std::out_of_range
)
static

Load the main data format to store polytopes.

Definition at line 26 of file IO_Polytope.cpp.

Here is the caller graph for this function:

void IO_Polytope::save ( const std::string &  filename,
boost::shared_ptr< PolyhedralCone_Rn POLY 
)
throw (std::ios_base::failure
)
static

Save the polytope to the main data format.

Definition at line 133 of file IO_Polytope.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: