politopix
5.0.0
|
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>
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) |
Load the main data format to store polytopes. More... | |
static polito_EXPORT void | save (const std::string &filename, boost::shared_ptr< PolyhedralCone_Rn > POLY) |
Save the polytope to the main data format. More... | |
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.
|
inline |
Definition at line 53 of file IO_Polytope.h.
|
inline |
Definition at line 55 of file IO_Polytope.h.
|
static |
Load the main data format to store polytopes.
Definition at line 26 of file IO_Polytope.cpp.
|
static |
Save the polytope to the main data format.
Definition at line 132 of file IO_Polytope.cpp.