|
4.25.1 polytopeViaVertices
Syntax:
polytopeViaVertices( intmat V )
polytopeViaVertices( intmat V, int flags )
Type:
- polytope
Purpose:
- polytope generated by the row vectors of V
(thought of as representatives of points in the projective space);
flags may only be 0 or 1,
if flags is 1, then program assumes that each row vector of M is
a vertex of the polytope,
if flags is 0, then program computes the information itself.
Example:
| // Let's a polytope in R^2 generated by:
intmat V[4][3]=
1,0,0,
1,1,0,
1,0,1,
1,1,1;
polytope p=polytopeViaVertices(V);
p;
==> AMBIENT_DIM
==> 3
==> INEQUALITIES
==> 0,0,1,
==> 0,1,0,
==> 1,-1,0,
==> 1,0,-1
==> EQUATIONS
==>
// the input points are exactly the vertices:
intmat V[4][3]=
==> // ** redefining V **
1,0,0,
1,1,0,
1,0,1,
1,1,1;
polytope p=polytopeViaVertices(V,1);
==> // ** redefining p **
p;
==> AMBIENT_DIM
==> 3
==> INEQUALITIES
==> 0,0,1,
==> 0,1,0,
==> 1,-1,0,
==> 1,0,-1
==> EQUATIONS
==>
|
|