there is a bug in computing the REGULAR property of a polyhedral fan. If I create the following fan, I get a negative result for REGULAR, however it is the normal fan of a polytope.
Best,
Sebastian
Code: Select all
fan > $rays=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[1,0,-1,-1],[-1,-1,0,0]];
fan > $cones=[[1,2,3,5],[1,2,4,5],[1,3,4,5],[0,3,4,5],[0,1,3,4],[0,1,2,3],[0,2,3,5],[0,1,2,4],[0,2,4,5]];
fan > $fan=new PolyhedralFan( INPUT_RAYS=>$rays, INPUT_CONES=>$cones );
fan > print $fan->REGULAR;
fan > $p=new Polytope(INEQUALITIES=>[ [ 1,1,0,0,0 ], [ 1,0,1,0,0 ], [ 1,0,0,1,0 ], [ 1,0,0,0,1 ], [ 1,1,0,-1,-1 ], [ 1,-1,-1,0,0 ] ]);
fan > $fan2=normal_fan($p);
fan > print $fan2->MAXIMAL_CONES;
{1 2 3 5}
{1 2 4 5}
{1 3 4 5}
{0 3 4 5}
{0 1 3 4}
{0 1 2 3}
{0 2 3 5}
{0 1 2 4}
{0 2 4 5}
fan > print $fan2->RAYS;
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
1 0 -1 -1
-1 -1 0 0
fan > print $fan2->REGULAR;
1