Changeset 35ceb0 in git for Singular


Ignore:
Timestamp:
May 4, 2005, 11:31:39 AM (19 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
9091d3c67d9cb6f17d3aec61f7c39d46db565862
Parents:
9a0cc7d25e77bedcb338c2ab32de3f3eefda109f
Message:
*pfister/lossen: fix


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/presolve.lib

    r9a0cc7 r35ceb0  
    11//last change: 13.02.2001 (Eric Westenberger)
    22///////////////////////////////////////////////////////////////////////////////
    3 version="$Id: presolve.lib,v 1.22 2005-05-02 11:53:42 Singular Exp $";
     3version="$Id: presolve.lib,v 1.23 2005-05-04 09:31:39 Singular Exp $";
    44category="Symbolic-numerical solving";
    55info="
     
    1919 tolessvars(id[,]);     maps id to new basering having only vars occuring in id
    2020 solvelinearpart(id);   reduced std-basis of linear part of id
    21  sortandmap(id [..]);   map to new basering with vars sorted w.r.t. complexity
     21 sortandmap(id[..]);   map to new basering with vars sorted w.r.t. complexity
    2222 sortvars(id[n1,p1..]); sort vars w.r.t. complexity in id [different blocks]
    2323 valvars(id[..]);       valuation of vars w.r.t. to their complexity in id
     
    3434LIB "ring.lib";
    3535LIB "elim.lib";
     36///////////////////////////////////////////////////////////////////////////////
     37proc shortid (id,int n,list #)
     38"USAGE:   shortid(id,n[,e]); id= ideal/module, n,e=integers
     39RETURN:  - if called with two arguments or e=0:
     40@*       same type as id, containing generators of id having <= n terms.
     41@*       - if called with three arguments and e!=0:
     42@*       a list L:
     43@*       L[1]: same type as id, containing generators of id having <= n terms.
     44@*       L[2]: number of corresponding generator of id
     45NOTE:    May be used to compute partial standard basis in case id is to hard
     46EXAMPLE: example shortid; shows an example 
     47"
     48{
     49  intvec v;
     50  int ii;
     51  for(ii=1; ii<=ncols(id); ii++)
     52  {
     53   if (size(id[ii]) <=n and id[ii]!=0 )
     54   {
     55     v=v,ii;
     56   }
     57   if (size(id[ii]) > n )
     58   {
     59       id[ii]=0;
     60   }
     61  }
     62  if( size(v)>1 )
     63  { 
     64    v = v[2..size(v)];
     65  }
     66  id = simplify(id,2);
     67  list L = id,v;
     68  if ( size(#)==0 )
     69  {
     70    return(id);
     71  }
     72  if ( size(#)!=0 )
     73  {
     74    if(#[1]==0)
     75    {
     76      return(id);
     77    }
     78    if(#[1]!=0)
     79    {
     80      return(L);
     81    }
     82  }
     83}
     84example
     85{ "EXAMPLE:"; echo = 2;
     86   ring s=0,(x,y,z,w),dp;
     87   ideal i = (x3+y2+yw2)^2,(xz+z2)^2,xyz-w2-xzw;
     88   shortid(i,3);
     89}
    3690///////////////////////////////////////////////////////////////////////////////
    3791
     
    148202      }
    149203   }
    150    lin = simplify(lin,2);
     204   lin = simplify(lin,3);
    151205   attrib(lin,"isSB",1);
    152206   ideal eva = lead(lin);
     
    293347                  kin = simplify(phi(kin),2);
    294348                  l = size(kin);
    295                   ii=ii+1;
     349                 // ii=ii+1;
    296350                  break;
    297351               }
     
    321375      }
    322376   }
    323    L = lin, eva, sub, neva, phi;
     377   map psi=P,phi;
     378   ideal phi1=maxideal(1);
     379   for(ii=1;ii<=size(eva);ii++){phi1=psi(phi1);}
     380   L = lin, eva, sub, neva, phi1;
    324381  return(L);
    325382}
     
    11641221///////////////////////////////////////////////////////////////////////////////
    11651222proc idealSplit(ideal I,list #)
    1166 "USAGE:  idealSplit(id,timeF,timeS);  id ideal and optioonal
     1223"USAGE:  idealSplit(id,timeF,timeS);  id ideal and optional
    11671224         timeF ,timeS integers to bound the time which can be used
    11681225         for factorization resp. standard basis computation
Note: See TracChangeset for help on using the changeset viewer.