| LIB "gfan.lib";
// Let's define a cone in R^3 given by the following inequalities:
intmat IE[6][3]=
1,3,5,
1,5,3,
0,1,-1,
0,1,1,
1,0,0,
-1,0,0;
cone c=coneViaInequalities(IE);
c;
==> AMBIENT_DIM
==> 3
==> INEQUALITIES
==> 0,1,-1,
==> 0,1, 1,
==> 1,3, 5,
==> 1,5, 3
==> LINEAR_SPAN
==> -1,0,0
==>
// Note that the last two inequalities yield x1 = 0, hence also possible:
intmat IE[4][3]=
==> // ** redefining IE (intmat IE[4][3]=) ./examples/coneViaInequalities.sin\
g:13
0,1,-1,
0,1,1;
intmat E[1][3]=
1,0,0;
cone c=coneViaInequalities(IE,E);
==> // ** redefining c (cone c=coneViaInequalities(IE,E);) ./examples/coneVia\
Inequalities.sing:18
c;
==> AMBIENT_DIM
==> 3
==> INEQUALITIES
==> 0,1,-1,
==> 0,1, 1
==> LINEAR_SPAN
==> 1,0,0
==>
// each inequalities gives rise to a facet
intmat IE[2][3]=
==> // ** redefining IE (intmat IE[2][3]=) ./examples/coneViaInequalities.sin\
g:21
0,1,-1,
0,1,1;
intmat E[1][3]=
==> // ** redefining E (intmat E[1][3]=) ./examples/coneViaInequalities.sing:\
24
1,0,0;
cone c=coneViaInequalities(IE,E,1);
==> // ** redefining c (cone c=coneViaInequalities(IE,E,1);) ./examples/coneV\
iaInequalities.sing:26
c;
==> AMBIENT_DIM
==> 3
==> INEQUALITIES
==> 0,1,-1,
==> 0,1, 1
==> LINEAR_SPAN
==> 1,0,0
==>
// and the kernel of E is the span of the cone
intmat IE[2][3]=
==> // ** redefining IE (intmat IE[2][3]=) ./examples/coneViaInequalities.sin\
g:29
0,1,-1,
0,1,1;
intmat E[1][3]=
==> // ** redefining E (intmat E[1][3]=) ./examples/coneViaInequalities.sing:\
32
1,0,0;
cone c=coneViaInequalities(IE,E,3);
==> // ** redefining c (cone c=coneViaInequalities(IE,E,3);) ./examples/coneV\
iaInequalities.sing:34
c;
==> AMBIENT_DIM
==> 3
==> FACETS
==> 0,1,-1,
==> 0,1, 1
==> LINEAR_SPAN
==> 1,0,0
==>
|