|
D.13.1.7 polymakeToIntmat
Procedure from library oldpolymake.lib (see oldpolymake_lib).
- Usage:
- polymakeToIntmat(pm,art); pm, art string
- Assume:
- pm is the result of calling polymake with one 'argument' like
VERTICES, AFFINE_HULL, etc., so that the first row of the string is
the name of the corresponding 'argument' and the further rows contain
the result which consists of vectors either over the integers
or over the rationals
- Return:
- intmat, the rows of the matrix are basically the vectors in pm, starting
from the second row, where each row has been multiplied with the
lowest common multiple of the denominators of its entries as if
it is an integer matrix; moreover, if art=='affine', then
the first column is omitted since we only want affine
coordinates
Example:
| LIB "oldpolymake.lib";
// this is the usual output of some polymake computation
string pm="VERTICES
0 1 3 5/3 1/3 -1 -23/3 -1/3 5/3 1/3 1
0 1 3 -23/3 5/3 1 5/3 1/3 1/3 -1/3 -1
0 1 1 1/3 -1/3 -1 5/3 1/3 -23/3 5/3 3
0 1 1 5/3 -23/3 3 1/3 5/3 -1/3 1/3 -1
0 1 -1 1/3 5/3 3 -1/3 -23/3 1/3 5/3 1
0 1 -1 -1/3 1/3 1 1/3 5/3 5/3 -23/3 3
0 1 -1 1 3 -5 -1 3 -1 1 -1
0 1 -1 -1 -1 -1 1 1 3 3 -5
0 1 -5 3 1 -1 3 -1 1 -1 -1
";
intmat PM=polymakeToIntmat(pm,"affine");
// note that the first column has been removed, since we asked for
// affine coordinates, and the denominators have been cleared
print(PM);
|
|