next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Normaliz :: normaliz(List)

normaliz(List) -- calls Normaliz with several input matrices

Synopsis

Description

This function applies Normaliz to all mat each in the type set by the second parameter nmzType. The function returns an object of type RationalCone defined by the file with suffix gen , if computed, and possibly some additional information. At the moment only choices of the types 4, 5 and 6 are possible. The type determines how the rows of the matrix are interpreted, see also writeNmzData, and decides what the program will do. Let L be the sublattice of ℤn that consists of the solutions of the system of congruences defined by the input matrix of type 6 (L=ℤn if there is no matrix of type 6). Let A be the matrix of type 4 and B be the matrix of type 5. Then the cone specified by this input data is the cone C={x∈ℝn: Ax=0, Bx ≥0} and the Hilbert basis of C∩L is computed. If there is no matrix of type 5, then the system of equations is empty, satisfied by all vectors of ℝn. Note that there is always a matrix of type 4, either explicitly, if it is in the input, or implicitly, namely the n ×n unit matrix, if there is no matrix of type 4 in the input (but one of type 5 or 6). It is possibly to give several matrices of the same type. All matrices of one type are then appended to one matrix by Normaliz.

By default, the cone returned contains only the content of the output file .gen, under the key "gen", i.e. the generators that have been computed, line by line and the content of the output file .inv, under the key "inv".

i1 : hy=matrix {{-1,0,-1,0,3,0,0,0,0},{-1,0,1,0,1,0,0,0,0},{1,0,1,0,-1,0,0,0,0},{1,0,-1,0,1,0,0,0,0}};

              4        9
o1 : Matrix ZZ  <--- ZZ
i2 : eq=matrix {{1,1,1,-1,-1,-1,0,0,0},{1,1,1,0,0,0,-1,-1,-1},{0,1,1,-1,0, 0,-1,0,0},{1,0,1,0,-1,0,0,-1,0},{1,1,0,0,0,-1,0,0,-1},{0,1,1,0,-1,0,0,0,-1},{1,1,0,0,-1,0,-1,0,0}};

              7        9
o2 : Matrix ZZ  <--- ZZ
i3 : cg=matrix {{1,0,0,0,0,0,0,0,0,2},{0,0,1,0,0,0,0,0,0,2},{0,0,0,0,0,0,1,0,0,2},{0,0,0,0,0,0,0,0,1,2}};

              4        10
o3 : Matrix ZZ  <--- ZZ
i4 : rc=normaliz({(hy,4),(eq,5),(cg,6)});
i5 : rc#"gen"

o5 = | 2 4 0 0 2 4 4 0 2 |
     | 4 0 2 0 2 4 2 4 0 |
     | 0 4 2 4 2 0 2 0 4 |
     | 2 0 4 4 2 0 0 4 2 |
     | 2 2 2 2 2 2 2 2 2 |
     | 4 3 2 1 3 5 4 3 2 |
     | 2 5 2 3 3 3 4 1 4 |
     | 2 3 4 5 3 1 2 3 4 |
     | 4 1 4 3 3 3 2 5 2 |

              9        9
o5 : Matrix ZZ  <--- ZZ

To obtain all the information written by Normaliz set the option allComputations to true (to decide which information shall be written by Normaliz use the options for Normaliz, see setNmzOption). Then the method returns an object of type RationalCone whose keys are the suffixes of all the output files written, with value the content of the corresponding output file, which is an matrix whose rows contain the data computed, except for the suffix inv, for which the type is a HashTable (see also getNumInvs). It can also be used with the option grading.

i6 : setNmzOption("allf",true);
i7 : arc=normaliz(allComputations=>true,{(hy,4),(eq,5),(cg,6)});
i8 : arc#"gen"

o8 = | 2 4 0 0 2 4 4 0 2 |
     | 4 0 2 0 2 4 2 4 0 |
     | 0 4 2 4 2 0 2 0 4 |
     | 2 0 4 4 2 0 0 4 2 |
     | 2 2 2 2 2 2 2 2 2 |
     | 2 3 4 5 3 1 2 3 4 |
     | 4 1 4 3 3 3 2 5 2 |
     | 4 3 2 1 3 5 4 3 2 |
     | 2 5 2 3 3 3 4 1 4 |

              9        9
o8 : Matrix ZZ  <--- ZZ
i9 : arc#"ext"

o9 = | 2 4 0 0 2 4 4 0 2 |
     | 4 0 2 0 2 4 2 4 0 |
     | 0 4 2 4 2 0 2 0 4 |
     | 2 0 4 4 2 0 0 4 2 |

              4        9
o9 : Matrix ZZ  <--- ZZ
i10 : arc#"inv"

o10 = HashTable{ => (1, 2, 2)                         }
                degree 1 elements => 0
                embedding dim => 9
                graded => true
                grading => (0, 0, 0, 0, 1, 0, 0, 0, 0)
                grading denom => 1
                hilbert basis elements => 9
                hilbert quasipolynomial denom => 2
                hilbert series denom => (1, 2, 2)
                hilbert series num => (1, -1, 3, 1)
                index => 4
                inhomogeneous => false
                multiplicity => 1
                multiplicity denom => 1
                number extreme rays => 4
                number support hyperplanes => 4
                rank => 3
                size triangulation => 2
                sum dets => 8

o10 : HashTable

See also