i1 : coneFromVData matrix {{0,0,-1,-1,1},{2,-2,1,-1,0},{1,1,1,1,0}} o1 = Cone{...1...} o1 : Cone |
This table displays a short summary of the properties of the Cone. The number of rays is modulo the lineality space. However, one can not access the above information directly, because this is just a virtual hash table generated for the output. The data describing a Cone is extracted by the functions included in this package. A Cone can be constructed as the positive hull (coneFromVData)of a set of rays or as the intersection (coneFromHData) of a set of linear half-spaces and linear hyperplanes.
As examples for the positive hull consider the following cones:
i2 : R = matrix{{1,2,3,1},{2,3,1,1},{3,1,2,1}} o2 = | 1 2 3 1 | | 2 3 1 1 | | 3 1 2 1 | 3 4 o2 : Matrix ZZ <--- ZZ |
i3 : C = coneFromVData R o3 = C o3 : Cone |
i4 : rays C o4 = | 2 3 1 | | 3 1 2 | | 1 2 3 | 3 3 o4 : Matrix ZZ <--- ZZ |
i5 : LS = matrix{{1},{1},{-2}} o5 = | 1 | | 1 | | -2 | 3 1 o5 : Matrix ZZ <--- ZZ |
i6 : C = coneFromVData(R,LS) o6 = C o6 : Cone |
i7 : rays C o7 = | 0 0 | | -1 1 | | 4 5 | 3 2 o7 : Matrix ZZ <--- ZZ |
On the other hand, we can use these matrices as defining half-spaces and hyperplanes for the intersection:
i8 : HS = transpose R o8 = | 1 2 3 | | 2 3 1 | | 3 1 2 | | 1 1 1 | 4 3 o8 : Matrix ZZ <--- ZZ |
i9 : C = coneFromHData HS o9 = C o9 : Cone |
i10 : rays C o10 = | 1 7 -5 | | 7 -5 1 | | -5 1 7 | 3 3 o10 : Matrix ZZ <--- ZZ |
i11 : hyperplanesTmp = transpose LS o11 = | 1 1 -2 | 1 3 o11 : Matrix ZZ <--- ZZ |
i12 : C = coneFromHData(HS,hyperplanesTmp) o12 = C o12 : Cone |
i13 : rays C o13 = | 7 -2 | | -5 4 | | 1 1 | 3 2 o13 : Matrix ZZ <--- ZZ |
See alsoWorking with cones.
The object Cone is a type, with ancestor classes PolyhedralObject < MutableHashTable < HashTable < Thing.