isComplete just calls an entry in the hash table of the Fan. The check for completeness
is done while generating the fan. Whenever a full dimensional Cone is added (see
fan
or
addCone) the set of faces of codimension 1 that appear only in one full dimensional Cone
is updated. The Fan is then complete if and only if this set is empty and there is at least one
full dimensional Cone.
i1 : C1 = posHull matrix {{1,0},{0,1}};
|
i2 : C2 = posHull matrix {{1,-1},{0,-2}};
|
i3 : C3 = posHull matrix {{0,-2},{1,-1}};
|
i4 : F = fan {C1,C2,C3}
o4 = {ambient dimension => 2 }
number of generating cones => 3
number of rays => 4
top dimension of the cones => 2
o4 : Fan
|
i5 : isComplete F
o5 = false
|
Hence the fan above is not complete, but we can add the missing cone:
i6 : C4 = posHull matrix {{-1,-2},{-2,-1}};
|
i7 : F = addCone(C4,F)
o7 = {ambient dimension => 2 }
number of generating cones => 4
number of rays => 4
top dimension of the cones => 2
o7 : Fan
|
i8 : isComplete F
o8 = true
|