Home Online Manual
Top
Back: setNmzExecPath
Forward: readNmzData
FastBack: normal_lib
FastForward: pointid_lib
Up: normaliz_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.4.18.17 writeNmzData

Procedure from library normaliz.lib (see normaliz_lib).

Usage:
writeNmzData(intmat M, int mode);
writeNmzData(intmat M, int mode, intmat M2, int mode2, ...);

Create:
Creates an input file for Normaliz from the matrix M. The second parameter sets the mode. How the matrix is interpreted depends on the mode. See the Normaliz documentation for more information.

It is also possible to give more than one pair of matrix and mode. In this case all matrices and modes are written. This can be used to combine modes 4,5,6.
Use mode=20 to specify a grading.

Note:
Needs an explicit filename set. The filename is created from the current filename.
Note that all functions in normaliz.lib write and read their data automatically to and from the hard disk so that writeNmzData will hardly ever be used explicitly.

Example:
 
LIB "normaliz.lib";
setNmzFilename("VeryInteresting");
intmat sgr[3][3]=1,2,3,4,5,6,7,8,10;
writeNmzData(sgr,1);
int dummy=system("sh","cat VeryInteresting.in");
==> 3
==> 3
==> 1 2 3 
==> 4 5 6 
==> 7 8 10 
==> 1
==> 
intmat Hyperplanes[2][3] = 2,-1,0, // 2x-y >= 0
1, 1,0; //  x+y >= 0
intmat Equation[1][3] = 0,1,-1;    // y = z
intmat Congruence[1][4] = 1,0,0,3;  // x = 0 (3)
writeNmzData(Hyperplanes,4,Equation,5,Congruence,6);
dummy=system("sh","cat VeryInteresting.in");
==> 2
==> 3
==> 2 -1 0 
==> 1 1 0 
==> 4
==> 
==> 1
==> 3
==> 0 1 -1 
==> 5
==> 
==> 1
==> 4
==> 1 0 0 3 
==> 6
==> 
See also: readNmzData; rmNmzFiles; setNmzDataPath; setNmzFilename.