Home Online Manual
Back: Parallelization with ssi 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. A technical reference is given at http://www.singular.uni-kl.de/Manual/modules.pdf.

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];

// load dynamic module - at the same time creating package Kstd
// procedures will be available in the packages Top and Kstd

// 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

// now consider 2 components
module mostd2=Kstd::kstd(mo,2); // calling procedure in Kstd
                    // this time the previously unconsidered pair was
                    // treated too