Changeset 823ff8 in git


Ignore:
Timestamp:
Feb 12, 2009, 2:57:00 PM (14 years ago)
Author:
Motsak Oleksandr <motsak@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
3735d1567b97cc35de0aeae181e4401fcb3a6178
Parents:
59290668f43ddad59db23c4230c5c49c26bebd53
Message:
*motsak: dafault optional argument for prodcrit instead of global variable


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/teachstd.lib

    r592906 r823ff8  
    22//GMG, last modified 28.9.01
    33///////////////////////////////////////////////////////////////////////////////
    4 version="$Id: teachstd.lib,v 1.9 2009-01-14 16:07:05 Singular Exp $";
     4version="$Id: teachstd.lib,v 1.10 2009-02-12 13:57:00 motsak Exp $";
    55category="Teaching";
    66info="
     
    2424 minEcart(T,h);         element g from T of minimal ecart s.t. LM(g)|LM(h)
    2525 NFMora(i);             normal form of i w.r.t Mora algorithm
    26  prodcrit(f,g);         test for product criterion
     26 prodcrit(f,g[,o]);     test for product criterion
    2727 chaincrit(f,g,h);      test for chain criterion
    2828 pairset(G);            pairs form G neither satifying prodcrit nor chaincrit
     
    409409}
    410410///////////////////////////////////////////////////////////////////////////////
    411 proc prodcrit(f,g)
    412 "USAGE:   prodcrit(f,g); f,g poly or vector
     411proc prodcrit(f,g,list #)
     412"USAGE:   prodcrit(f,g[,o]); f,g poly or vector, and optional int argument o
    413413RETURN:  1 if product criterion applies in the same module component,
    414414         2 if lead(f) and lead(g) involve different components, 0 else
    415415NOTE:    if product criterion applies we can delete (f,g) from pairset
     416         This procedure returns 0 if o is given and is a positive integer, or
     417         you may set the attribute \"default_arg\" for prodcrit to 1.
    416418EXAMPLE: example prodcrit; shows an example
    417419"
    418420{
    419   if( defined(@@@NOPC) )
    420   {
    421     if( @@@NOPC == 1) { return(0); }
    422   }
    423 
    424   if(typeof(f)=="poly")    //product criterion for polynomials
     421// ------------------ check for optional disabling argument -------------
     422  if( size(#) > 0 )
     423  {// "size(#): ", size(#);   "typeof(#[1]): ", typeof(#[1]);
     424   
     425    if( typeof(#[1]) == "int" )
     426    {// "#[1] = int ", #[1];
     427      if( #[1] > 0 )
     428      {       
     429        return(0);
     430      }
     431    }
     432  }
     433
     434// ------------------- product criterion for polynomials ---------------------
     435  if(typeof(f)=="poly")
    425436  {
    426437    if( monomialLcm(f,g)==leadmonom(f)*leadmonom(g))
Note: See TracChangeset for help on using the changeset viewer.