|
4.22.1 coneViaPoints
Syntax:
coneViaPoints( intmat HL )
coneViaPoints( intmat HL, intmat L )
coneViaPoints( intmat HL, intmat L, int flags )
Type:
- cone
Purpose:
- cone generated by half lines generated by the row vectors of HL
and (if stated) by lines generated by the row vectors of L;
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 upper bit is 1, then program assumes that each row vector in HL
generates a ray of the cone,
if lower bit is 1, then program assumes that the span of the row
vectors of L is the lineality space of the cone,
if either bit is 0, then program computes the information itself.
Example:
| LIB"gfanlib.so";
// Let's define a cone in R^3 generated by the following half lines:
intmat HL[5][3]=
1,0, 0,
-1,0, 0,
0,1, 1,
0,1,-1,
0,0, 1;
cone c=coneViaPoints(HL);
c;
==> AMBIENT_DIM
==> 3
==> FACETS
==> 0,1,0,
==> 0,1,1
==> LINEAR_SPAN
==>
==>
kill HL,c;
// Note that (1,0,0) and (-1,0,0) form a line, hence also possible:
intmat HL[3][3]=
0,1, 1,
0,1,-1,
0,0, 1;
intmat L[1][3]=
1,0,0;
cone c=coneViaPoints(HL,L);
c;
==> AMBIENT_DIM
==> 3
==> FACETS
==> 0,1,0,
==> 0,1,1
==> LINEAR_SPAN
==>
==>
kill HL,L,c;
// lineality space is exactly Lin(1,0,0)
intmat HL[3][3]=
0,1, 1,
0,1,-1,
0,0, 1;
intmat L[1][3]=
1,0,0;
cone c=coneViaPoints(HL,L,1);
c;
==> AMBIENT_DIM
==> 3
==> FACETS
==> 0,1,0,
==> 0,1,1
==> LINEAR_SPAN
==>
==>
kill HL,L,c;
// and that (0,1,-1), (0,1,1) generate rays
intmat HL[3][3]=
0,1, 1,
0,1,-1;
intmat L[1][3]=
1,0,0;
cone c=coneViaPoints(HL,L,3);
c;
==> AMBIENT_DIM
==> 3
==> FACETS
==> 0,1,-1,
==> 0,1, 1
==> LINEAR_SPAN
==>
==>
|
|