Changeset 4a1fb8 in git


Ignore:
Timestamp:
Feb 1, 2010, 6:53:37 PM (13 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a657104b677b4c461d018cbf3204d72d34ad66a9')
Children:
4ef1dfd09ee62691785ce3fb3e1611dd9d7a7ee8
Parents:
c3f34aa4c535165147830044c1b715ef91230476
Message:
new version: normaliz.lib

git-svn-id: file:///usr/local/Singular/svn/trunk@12493 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/normaliz.lib

    rc3f34a r4a1fb8  
    44category="Commutative algebra"
    55info="
    6 LIBRARY: normaliz.lib  Provides an interface for the use of Normaliz 2.1 within Singular.
     6LIBRARY: normaliz.lib  Provides an interface for the use of Normaliz 2.2 within SINGULAR.
    77AUTHORS:  Winfried Bruns, Winfried.Bruns@Uni-Osnabrueck.de
    88          Christof Soeger, Christof.Soeger@Uni-Osnabrueck.de
    99
    1010OVERVIEW:
    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.
     11The 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
     15automatically created and erased behind the scenes. As long as one
     16wants to use only the ring-theoretic functions there is no need for
     17file management.
     18@*
     19@*Note that the numerical invariants computed by Normaliz can be
     20accessed in this \"automatic file mode\".
     21@*
     22@*However, if Singular is used as a frontend for Normaliz or the user
     23wants to inspect data not automatically returned to Singular, then
     24an explicit filename and a path can be specified for the exchange of
     25data. Moreover, the library provides functions for access to these files.
     26Deletion of the files is left to the user.
     27@*
     28@* Use of this library requires the program Normaliz to be installed.
     29You 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
     32NOTE:    These library functions use @code{sed} to transfer the Normaliz output into a SINGULAR compliant format.
    1833
    1934
     
    3651  showNmzOptions()               prints the enabled options to the standard output
    3752
    38 
    3953  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
    4057  writeNmzData(intmat sgr, int n_mode) creates an input file for Normaliz
    4158  readNmzData(string nmz_suffix) reads the Normaliz output file with the specified suffix
    4259
    43   setNmzExecPath(string nmz_exec_path_name) sets the path to the Normaliz executable
    44   setNmzVersion(string nmz_version_name) sets the version of the Normaliz executable
    4560  setNmzFilename(string nmz_filename_name) sets the filename for the exchange of data
    4661  setNmzDataPath(string nmz_data_path_name) sets the directory for the exchange of data
     
    129144"USAGE:   setNmzExecPath(string s);   @code{s} path to the Normaliz executable
    130145CREATE:   @code{Normaliz::nmz_exec_path} to save the given path @code{s}
     146NOTE:     It is not necessary to use this function if the Normaliz executable is in the search path of the system.
    131147SEE ALSO: setNmzVersion
    132148EXAMPLE:  example setNmzExecPath; shows an example"
     
    164180NOTE:     The function sets the filename for the exchange of data. Unless a path is set by setNmzDataPath,
    165181          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}).
    167183          @* 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.
    168184SEE ALSO: writeNmzData, readNmzData, setNmzDataPath, rmNmzFiles
     
    335351"USAGE:   rmNmzFiles();
    336352PURPOSE: 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}.
     353It needs an explicit filename set (see @ref{setNmzFilename}).
    338354SEE ALSO: writeNmzData, readNmzData, setNmzFilename, setNmzDataPath
    339355EXAMPLE:  example rmNmzFiles; shows an example
     
    345361    }
    346362
    347     list suffixes="in","gen","out","sup","typ","egn","esp","inv","tri","hom","ext";
     363    list suffixes="in","gen","out","sup","typ","egn","esp","inv","tri","ht1","ext";
    348364    int i,dummy;
    349365    string f;
     
    547563proc writeNmzData(intmat sgr, int n_mode)
    548564"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.
     565CREATE:   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.
     566NOTE:     Needs an explicit filename set. The filename is created from the current  filename and the suffix given to the function.
    551567   @*     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.
    552568SEE ALSO: readNmzData, rmNmzFiles, setNmzFilename, setNmzDataPath
     
    568584
    569585
    570 proc readNmzData(string nmz_suffix)     //TODO debugoutput wieder rausnehmen
     586proc readNmzData(string nmz_suffix)
    571587"USAGE:   readNmzData(string suffix);
    572588RETURN:   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.
    573589NOTE:     Needs an explicit filename set by setNmzFilename.
    574590   @*     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 sed to 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.
    576592SEE ALSO: writeNmzData, rmNmzFiles, setNmzFilename, setNmzDataPath
    577593EXAMPLE:  example readNmzData; shows an example"
     
    589605    string filename = getNmzFile() + "."+ nmz_suffix;
    590606    string tmpfilename = filename+".tmp";
    591 //"// ** readNmzData: initialisiert";
     607//"// ** readNmzData: initialisiert";    //TODO debugoutput wieder rausnehmen
    592608    returnvalue = system("sh","sed 's/ /,/g' < "+filename+" > "+tmpfilename);
    593609//"// ** readNmzData: sed ausgefuehrt";
     
    644660        list("control",0,"-c",2),
    645661        list("allf",0,"-a",2),
    646         list("ignore",1,"-i",2);
     662        list("ignore",1,"-i",2),
     663        list("errorcheck",0,"-e",2);
    647664        export(nmz_options);
    648665    }
     
    662679@* @code{-c:  control}
    663680@* @code{-i:  ignore}
     681@* @code{-e:  errorcheck}
    664682SEE ALSO: showNmzOptions
    665683EXAMPLE:  example setNmzOption; shows an example
     
    770788RETURN:   The function applies Normaliz to the parameter sgr in the mode set by nmz_mode. The
    771789function 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.
     790NOTE:     You will find procedures for many applications of Normaliz in this library, so the explicit call of this procedure may not be necessary.
    773791SEE ALSO: intclToricRing, normalToricRing, ehrhartRing, intclMonIdeal, torusInvariants, valRing, valRingIdeal
    774792EXAMPLE:  example normaliz; shows an example
     
    891909proc exportNuminvs()
    892910"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.
     911CREATE:   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.
    894912SEE ALSO: showNuminvs
    895913EXAMPLE:  example exportNuminvs; shows an example
     
    963981"USAGE:   intmat2mons(intmat M);
    964982RETURN:   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 omitted
     983NOTE:     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}).
    966984SEE ALSO: mons2intmat
    967985EXAMPLE:  example intmat2mons; shows an example
     
    10451063proc intclToricRing(ideal I)
    10461064"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.
     1065RETURN:    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.
    10501066@*         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}).
    10511067NOTE:     A mathematical remark: the toric ring depends on the list of monomials given, and not only on the ideal they generate!
     
    10651081proc normalToricRing(ideal I)
    10661082"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.
     1083RETURN:    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.
    10681084@*         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}).
    10691085NOTE:     A mathematical remark: the toric ring depends on the list of monomials given, and not only on the ideal they generate!
     
    11211137proc ehrhartRing(ideal I)
    11221138"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:
     1139RETURN:    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:
    11241140@*         (i) If the last ring variable is not used by the monomials, it is treated as the auxiliary variable
    11251141of 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.
     
    11441160proc intclMonIdeal(ideal I)
    11451161"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 whose Rees algebra is computed. The function returns a list of
     1162RETURN:   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
    11471163ideals:
    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.
    11541166@*         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 ring depends on the list of monomials given, and not only on the ideal they generate!
     1167NOTE:     A mathematical remark: the Rees algebra depends on the list of monomials given, and not only on the ideal they generate!
    11561168SEE ALSO: intclToricRing, normalToricRing, ehrhartRing
    11571169EXAMPLE:  example intclMonIdeal; shows an example
     
    13441356 valRingIdeal(V);
    13451357}
     1358
     1359
Note: See TracChangeset for help on using the changeset viewer.