Top
Back: Parallelization with MPtcp links
Forward: Computing Groebner and Standard Bases
FastBack: Examples
FastForward: groebner and std
Up: Programming
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

A.1.9 Dynamic modules

The purpose of the following example is to illustrate the use of dynamic modules. Giving an example on how to write a dynamic module is beyond the scope of this manual. Detailed information on the latter topic can be found in a separate PostScript file at http://www.singular.uni-kl.de/DynMod.ps.

In this example, we use a dynamic module, residing in the file kstd.so, which allows ignoring all but the first j entries of vectors when forming the pairs in the standard basis computation.

 
ring r=0,(x,y),dp;
module mo=[x^2-y^2,1,0,0],[xy+y^2,0,1,0],[y^2,0,0,1];
print(mo);
==> x2-y2,xy+y2,y2,
==> 1,    0,    0, 
==> 0,    1,    0, 
==> 0,    0,    1  

// load dynamic module - at the same time creating package Kstd
// procedures will be available in the packages Top and Kstd
LIB("kstd.so");
listvar(package);
==> // Kstd                 [0]  package (C,kstd.so)
==> // Standard             [0]  package (S,standard.lib)
==> // Top                  [0]  package (N)

// set the number of components to be considered to 1
module mostd=kstd(mo,1);        // calling procedure in Top
                    // obviously computation ignored pairs with leading
                    // term in the second entry
print(mostd);
==> 0,  0,  y2,xy,x2,
==> -y, y,  0, 0, 1, 
==> x-y,-x, 0, 1, 0, 
==> 0,  x+y,1, -1,1  

// now consider 2 components
module mostd2=Kstd::kstd(mo,2); // calling procedure in Kstd
                    // this time the previously unconsidered pair was
                    // treated too
print(mostd2);
==> 0,  0,   y2,xy,x2,
==> 0,  y,   0, 0, 1, 
==> -y, -x+y,0, 1, 0, 
==> x+y,0,   1, -1,1  


Top Back: Parallelization with MPtcp links Forward: Computing Groebner and Standard Bases FastBack: Examples FastForward: groebner and std Up: Programming Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 3-1-2, Oct 2010, generated by texi2html.