Changeset 4a1fb8 in git
- Timestamp:
- Feb 1, 2010, 6:53:37 PM (13 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a657104b677b4c461d018cbf3204d72d34ad66a9')
- Children:
- 4ef1dfd09ee62691785ce3fb3e1611dd9d7a7ee8
- Parents:
- c3f34aa4c535165147830044c1b715ef91230476
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/normaliz.lib
rc3f34a r4a1fb8 4 4 category="Commutative algebra" 5 5 info=" 6 LIBRARY: normaliz.lib Provides an interface for the use of Normaliz 2. 1 within Singular.6 LIBRARY: normaliz.lib Provides an interface for the use of Normaliz 2.2 within SINGULAR. 7 7 AUTHORS: Winfried Bruns, Winfried.Bruns@Uni-Osnabrueck.de 8 8 Christof Soeger, Christof.Soeger@Uni-Osnabrueck.de 9 9 10 10 OVERVIEW: 11 The library normaliz.lib provides an interface for the use of Normaliz 2.1 within Singular. The exchange of data is via files, the only possibility offered by Normaliz in its present version. In addition to the top level functions that aim at objects of type ideal or ring, several other auxiliary functions allow the user to apply Normaliz to data of type intmat. Therefore Singular can be used as a comfortable environment for the work with Normaliz. 12 @* Using this library requires the program @code{normliz} to be installed. 13 You can download @code{normliz} from 14 @uref{http://www.mathematik.uni-osnabrueck.de/normaliz/}. 15 16 17 NOTE: These library functions use @code{sed} to transfer the @code{normaliz} output into a SINGULAR compliant format. 11 The library normaliz.lib provides an interface for the use of Normaliz 2.2 within SINGULAR. The exchange of data is via files, the only possibility offered by Normaliz in its present version. In addition to the top level functions that aim at objects of type ideal or ring, several other auxiliary functions allow the user to apply Normaliz to data of type intmat. Therefore SINGULAR can be used as a comfortable environment for the work with Normaliz. 12 @* Please see the @code{Normaliz2.2Documentation.pdf} and @code{nmz_sing.pdf} (both are included in the Normaliz distribution) for a more extensive documentation of Normaliz. 13 @* 14 @*Singular and Normaliz exchange data via files. These files are 15 automatically created and erased behind the scenes. As long as one 16 wants to use only the ring-theoretic functions there is no need for 17 file management. 18 @* 19 @*Note that the numerical invariants computed by Normaliz can be 20 accessed in this \"automatic file mode\". 21 @* 22 @*However, if Singular is used as a frontend for Normaliz or the user 23 wants to inspect data not automatically returned to Singular, then 24 an explicit filename and a path can be specified for the exchange of 25 data. Moreover, the library provides functions for access to these files. 26 Deletion of the files is left to the user. 27 @* 28 @* Use of this library requires the program Normaliz to be installed. 29 You can download it from 30 @uref{http://www.mathematik.uni-osnabrueck.de/normaliz/}. Please make sure that the executables are in the search path or use setNmzExecPath (@ref{setNmzExecPath}). 31 32 NOTE: These library functions use @code{sed} to transfer the Normaliz output into a SINGULAR compliant format. 18 33 19 34 … … 36 51 showNmzOptions() prints the enabled options to the standard output 37 52 38 39 53 normaliz(intmat sgr,int nmz_mode) applies Normaliz 54 setNmzVersion(string nmz_version_name) sets the version of the Normaliz executable 55 setNmzExecPath(string nmz_exec_path_name) sets the path to the Normaliz executable 56 40 57 writeNmzData(intmat sgr, int n_mode) creates an input file for Normaliz 41 58 readNmzData(string nmz_suffix) reads the Normaliz output file with the specified suffix 42 59 43 setNmzExecPath(string nmz_exec_path_name) sets the path to the Normaliz executable44 setNmzVersion(string nmz_version_name) sets the version of the Normaliz executable45 60 setNmzFilename(string nmz_filename_name) sets the filename for the exchange of data 46 61 setNmzDataPath(string nmz_data_path_name) sets the directory for the exchange of data … … 129 144 "USAGE: setNmzExecPath(string s); @code{s} path to the Normaliz executable 130 145 CREATE: @code{Normaliz::nmz_exec_path} to save the given path @code{s} 146 NOTE: It is not necessary to use this function if the Normaliz executable is in the search path of the system. 131 147 SEE ALSO: setNmzVersion 132 148 EXAMPLE: example setNmzExecPath; shows an example" … … 164 180 NOTE: The function sets the filename for the exchange of data. Unless a path is set by setNmzDataPath, 165 181 files will be created in the current directory. 166 @* If a non-empty filename is set, the files created for and by Normaliz are kept. This is mandatory for @ref{writeNmzData} and @ref{readNmzData}.182 @* If a non-empty filename is set, the files created for and by Normaliz are kept. This is mandatory for the data access functions (see @ref{writeNmzData} and @ref{readNmzData}). 167 183 @* Resetting the filename by setNmzFilename(\"\") forces the library to return to deletion of temporary files, but the files created while the filename had been set will not be erased. 168 184 SEE ALSO: writeNmzData, readNmzData, setNmzDataPath, rmNmzFiles … … 335 351 "USAGE: rmNmzFiles(); 336 352 PURPOSE: This function removes the files created for and by Normaliz, using the last filename specified. 337 It needs an explicit filename set by @ref{setNmzFilename}.353 It needs an explicit filename set (see @ref{setNmzFilename}). 338 354 SEE ALSO: writeNmzData, readNmzData, setNmzFilename, setNmzDataPath 339 355 EXAMPLE: example rmNmzFiles; shows an example … … 345 361 } 346 362 347 list suffixes="in","gen","out","sup","typ","egn","esp","inv","tri","h om","ext";363 list suffixes="in","gen","out","sup","typ","egn","esp","inv","tri","ht1","ext"; 348 364 int i,dummy; 349 365 string f; … … 547 563 proc writeNmzData(intmat sgr, int n_mode) 548 564 "USAGE: writeNmzData(intmat M, int mode); 549 CREATE: Creates an input file for Normaliz . The rows of @code{M} are considered as the generators of the semigroup. The parameter @code{mode} sets the mode.550 NOTE: Needs an explicit filename set by @ref{setNmzFilename}. The filename is created from the current filename and the suffix given to the function.565 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. 566 NOTE: Needs an explicit filename set. The filename is created from the current filename and the suffix given to the function. 551 567 @* 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. 552 568 SEE ALSO: readNmzData, rmNmzFiles, setNmzFilename, setNmzDataPath … … 568 584 569 585 570 proc readNmzData(string nmz_suffix) //TODO debugoutput wieder rausnehmen586 proc readNmzData(string nmz_suffix) 571 587 "USAGE: readNmzData(string suffix); 572 588 RETURN: Reads an output file of Normaliz containing an integer matrix and returns it as an intmat. For example, this function is useful if one wants to inspect the support hyperplanes. The filename is created from the current filename and the suffix given to the function. 573 589 NOTE: Needs an explicit filename set by setNmzFilename. 574 590 @* Note that all functions in normaliz.lib write and read their data automatically so that readNmzData will usually not be used explicitly. 575 @* This function uses the command sedto transfer the normaliz output into a singular conform format.591 @* This function uses the command @code{sed} to transfer the normaliz output into a singular conform format. 576 592 SEE ALSO: writeNmzData, rmNmzFiles, setNmzFilename, setNmzDataPath 577 593 EXAMPLE: example readNmzData; shows an example" … … 589 605 string filename = getNmzFile() + "."+ nmz_suffix; 590 606 string tmpfilename = filename+".tmp"; 591 //"// ** readNmzData: initialisiert"; 607 //"// ** readNmzData: initialisiert"; //TODO debugoutput wieder rausnehmen 592 608 returnvalue = system("sh","sed 's/ /,/g' < "+filename+" > "+tmpfilename); 593 609 //"// ** readNmzData: sed ausgefuehrt"; … … 644 660 list("control",0,"-c",2), 645 661 list("allf",0,"-a",2), 646 list("ignore",1,"-i",2); 662 list("ignore",1,"-i",2), 663 list("errorcheck",0,"-e",2); 647 664 export(nmz_options); 648 665 } … … 662 679 @* @code{-c: control} 663 680 @* @code{-i: ignore} 681 @* @code{-e: errorcheck} 664 682 SEE ALSO: showNmzOptions 665 683 EXAMPLE: example setNmzOption; shows an example … … 770 788 RETURN: The function applies Normaliz to the parameter sgr in the mode set by nmz_mode. The 771 789 function returns the intmat defined by the file with suffix gen. 772 NOTE: You will find procedures for many applications in this library, so the explicit call of this procedure may not be necessary.790 NOTE: You will find procedures for many applications of Normaliz in this library, so the explicit call of this procedure may not be necessary. 773 791 SEE ALSO: intclToricRing, normalToricRing, ehrhartRing, intclMonIdeal, torusInvariants, valRing, valRingIdeal 774 792 EXAMPLE: example normaliz; shows an example … … 891 909 proc exportNuminvs() 892 910 "USAGE: exportNuminvs(); 893 CREATE: Creates top-level variables which contain the numerical invariants. Depending on the options of normaliz different invariants are calculated. Use @ref{showNuminvs}to see which invariants are available.911 CREATE: Creates top-level variables which contain the numerical invariants. Depending on the options of normaliz different invariants are calculated. Use showNuminvs (@ref{showNuminvs}) to see which invariants are available. 894 912 SEE ALSO: showNuminvs 895 913 EXAMPLE: example exportNuminvs; shows an example … … 963 981 "USAGE: intmat2mons(intmat M); 964 982 RETURN: an ideal generated by the monomials which correspond to the exponent vectors given by the rows of @code{M} 965 NOTE: The number of variables in the basering @code{nvars(basering)} has to be at least the number of columns @code{ncols(M)}, otherwise an @ref{ERROR} is omitted983 NOTE: The number of variables in the basering @code{nvars(basering)} has to be at least the number of columns @code{ncols(M)}, otherwise an error is omitted (see @ref{ERROR}). 966 984 SEE ALSO: mons2intmat 967 985 EXAMPLE: example intmat2mons; shows an example … … 1045 1063 proc intclToricRing(ideal I) 1046 1064 "USAGE: intclToricRing(ideal I); 1047 RETURN: Computes the integral closure of the toric ring generated by the leading monomials of the 1048 elements of @code{I} in the basering. The function returns an ideal listing the generators of the 1049 integral closure. 1065 RETURN: Let S be the toric ring generated by the leading monomials of the elements of I. The function computes the integral closure of S in the basering and returns an ideal listing the generators. 1050 1066 @* The function returns nothing if one of the options @code{supp}, @code{triang}, or @code{hvect} has been activated. However, in this case some numerical invariants are computed, and some other data may be contained in files that you can read into Singular (see @ref{showNuminvs}, @ref{exportNuminvs}). 1051 1067 NOTE: A mathematical remark: the toric ring depends on the list of monomials given, and not only on the ideal they generate! … … 1065 1081 proc normalToricRing(ideal I) 1066 1082 "USAGE: normalToricRing(ideal I); 1067 RETURN: Computes the normalization of the toric ring generated by the leading monomials of the elements of @code{I}. The function returns an ideal listing the generators of the normalization.1083 RETURN: Computes the normalization of the toric ring generated by the leading monomials of the elements of I. The function returns an ideal listing the generators of the normalization. 1068 1084 @* The function returns nothing if one of the options @code{supp}, @code{triang}, or @code{hvect} has been activated. However, in this case some numerical invariants are computed, and some other data may be contained in files that you can read into Singular (see @ref{showNuminvs}, @ref{exportNuminvs}). 1069 1085 NOTE: A mathematical remark: the toric ring depends on the list of monomials given, and not only on the ideal they generate! … … 1121 1137 proc ehrhartRing(ideal I) 1122 1138 "USAGE: ehrhartRing(ideal I); 1123 RETURN: The exponent vectors of the leading monomials of the elements of @code{I} are considered as generators of a lattice polytope. The function returns a list of ideals:1139 RETURN: The exponent vectors of the leading monomials of the elements of I are considered as verices of a lattice polytope. The function returns a list of ideals: 1124 1140 @* (i) If the last ring variable is not used by the monomials, it is treated as the auxiliary variable 1125 1141 of the Ehrhart ring. The function returns two ideals, the first containing the monomials representing the lattice points of the polytope, the second containing the generators of the Ehrhart ring. … … 1144 1160 proc intclMonIdeal(ideal I) 1145 1161 "USAGE: intclMonIdeal(ideal I); 1146 RETURN: The exponent vectors of the leading monomials of the elements of @code{I} are considered as generators of a monomial ideal whoseRees algebra is computed. The function returns a list of1162 RETURN: The exponent vectors of the leading monomials of the elements of I are considered as generators of a monomial ideal for which the normalization of its Rees algebra is computed. The function returns a list of 1147 1163 ideals: 1148 @* (i) If the last ring variable is not used by the monomials, it is treated as the auxiliary variable of 1149 the Rees algebra. The function returns two ideals, the first containing the monomials generating 1150 the integral closure of the monomial ideal, the second containing the generators of the Rees 1151 algebra. 1152 @* (ii) If the last ring variable is used by the monomials, the list returned contains only one ideal, 1153 namely the monomials generating the integral closure of the ideal. 1164 @* (i) If the last ring variable is not used by the monomials, it is treated as the auxiliary variable of the Rees algebra. The function returns two ideals, the first containing the monomials generating the integral closure of the monomial ideal, the second containing the generators of the normalization Rees algebra. 1165 @* (ii) If the last ring variable is used by the monomials, the list returned contains only one ideal, namely the monomials generating the integral closure of the ideal. 1154 1166 @* The function returns nothing if one of the options @code{supp}, @code{triang}, or @code{hvect} has been activated. However, in this case some numerical invariants are computed, and some other data may be contained in files that you can read into Singular (see @ref{showNuminvs}, @ref{exportNuminvs}). 1155 NOTE: A mathematical remark: the toric ringdepends on the list of monomials given, and not only on the ideal they generate!1167 NOTE: A mathematical remark: the Rees algebra depends on the list of monomials given, and not only on the ideal they generate! 1156 1168 SEE ALSO: intclToricRing, normalToricRing, ehrhartRing 1157 1169 EXAMPLE: example intclMonIdeal; shows an example … … 1344 1356 valRingIdeal(V); 1345 1357 } 1358 1359
Note: See TracChangeset
for help on using the changeset viewer.