Home Online Manual
Top
Back: coneViaPoints
Forward: coneLink
FastBack:
FastForward:
Up: gfan_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.13.1.8 coneViaInequalities

Procedure from library gfan.lib (see gfan_lib).

Usage:
coneViaInequalities(IE); intmat IE
coneViaInequalities(IE,E); intmat IE, intmat E
coneViaInequalities(IE,E,flags); intmat IE, intmat E, int flags

Return:
cone

Purpose:
cone consisting of all points x, such that IE*x >= 0 in each component and (if stated) E*x = 0;
inequalities and (if stated) equations will be transformed, getting rid of redundancies;
flags may range between 0,..,3 defining an upper and lower bit (0=0*2+0, 1=0*2+1, 2=1*2+0, 3=1*2+1),
if higher bit is 1, then program assumes each inequality yields a facet, if lower bit is 1, then program assumes the kernel of E is the span of the cone, if either bit is 0, then program computes the information itself.

Example:
 
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
==>