next | previous | forward | backward | up | index | toc

## Synopsis

• Usage:
F1 = addCone(C,F)
F1 = addCone(L,F)
• Inputs:
• L, a list, with elements of class Cone or Fan
• F, an instance of the type Fan
• Outputs:
• F1, an instance of the type Fan

## Description

If addCone is applied to a Cone and a Fan it adds the Cone to the Fan if they are in the same ambient space, if the Cone is compatible with every generating Cone of F, but is not a face of one of them. If one of the first two conditions fails, there will be an error and no fan will be returned. The pairs of incompatible cones can be accessed with the function incompCones. If the last condition fails, then the cone is already in the fan as a face of one of the cones, so it does not have to be added. The conditions are checked in this order.

If addCone is applied to a List and a Fan, then the function adds the list cone by cone and stops if one of the three conditions fails for one of the cones. There is again an error for the first two conditions. The pairs of incompatible cones can again be retrieved using incompCones.

If applied to a pair of fans it adds the generating cones of the first fan to the second fan, again checking for the same conditions as above.

As an example, we make a fan consisting of the following cone and try to add an adjacent orthant.
 i1 : C = posHull matrix {{1,0,0},{0,1,1},{0,0,1}}; i2 : F = fan C o2 = {ambient dimension => 3 } number of generating cones => 1 number of rays => 3 top dimension of the cones => 3 o2 : Fan i3 : C = posHull matrix {{-1,0,0},{0,1,0},{0,0,1}}; i4 : incompCones(C,F) o4 = {({ambient dimension => 3 }, {ambient dimension => 3 dimension of lineality space => 0 dimension of lineality space => dimension of the cone => 3 dimension of the cone => 3 number of facets => 3 number of facets => 3 number of rays => 3 number of rays => 3 ------------------------------------------------------------------------ })} 0 o4 : List

This shows that the two cones do not intersect in a common face, but if we divide C into two parts, we get a fan.
 i5 : C1 = intersection {C, (matrix {{0,1,-1}}, matrix {{0}})}; i6 : C2 = intersection {C, (matrix {{0,-1,1}}, matrix {{0}})}; i7 : F = addCone({C1,C2},F) o7 = {ambient dimension => 3 } number of generating cones => 3 number of rays => 5 top dimension of the cones => 3 o7 : Fan