Changeset 62e942 in git


Ignore:
Timestamp:
Jun 30, 2005, 4:03:37 PM (19 years ago)
Author:
Nadine Cremer <cremer@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
a04d1f9ce550211f34c7952ed8934d6634a90d99
Parents:
8cfae9e49d7d3f953224e84978f38bdc5d131bbd
Message:
*cremer: there must be some mistake in the algp as it is implemented... :(


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/lejeune.lib

    r8cfae9 r62e942  
    11
    22//-*- mode:C++;-*-
    3 // $Id: lejeune.lib,v 1.11 2005-06-24 13:40:06 cremer Exp $
     3// $Id: lejeune.lib,v 1.12 2005-06-30 14:03:37 cremer Exp $
    44
    55
     
    3636{                                    // f_setstep
    3737  def r=basering;
     38  int startvar=nvars(basering);
     39  export(startvar);
    3840  int b=size(H);
    3941  int i;
     
    4749     setring R;
    4850     I=imap(tmp, resultf_set);
     51     I=simplify(I,2);
     52     I=simplify(I,4);
     53     I=idealsimplify(I);
     54     I=idealsimplify(I);I;~;
    4955     kill tmp;
    5056     J=J,I;
    51      
    52    }
    53   J=simplify(J,2);
    54   J=slimgb(radical(J));
     57   }
     58  //J=idealsimplify(J);J;~;
     59  //J=simplify(J,4);
     60  //J=simplify(J,2);
     61  //J=std(J);
    5562  J;
    5663  return(R);
     
    5966
    6067
    61   proc f_setstep (poly f,intvec H)
     68proc f_setstep (poly f,intvec H)      // returns the conditions for one step
    6269{
    6370  int p;                              // loop variable
    6471  int m_0=order(f);
    65   int startvar=nvars(basering);                       
    6672  int b=size(H);
    6773  int c=sum(H,1..b-1);
     
    94100{
    95101  int s,t,v;                          // loop variables
    96   int u;                    
     102  int u;                   
    97103  def R=plugin_coeffs(f,i);           // plugs the power series in...
    98104  setring R;                          // changes the ring
     
    240246    }
    241247}
     248
     249
     250proc idealsimplify (ideal I)
     251{
     252  int i,j;
     253  int divisornumber=0;
     254  int pos;
     255  for(j=1;j<=ncols(I);j++)
     256    {
     257      for(i=1;i<=nvars(basering);i++)     
     258       { 
     259         if(modd(I[j],var(i))==0)
     260           {
     261             divisornumber++;
     262             pos=i;
     263           }
     264       }
     265      if(divisornumber==1)
     266        {
     267          I[j]=var(pos);
     268        }
     269      divisornumber=0;
     270    }
     271  return(I);
     272}
     273
     274
     275
     276proc nonzerosize (intvec v)
     277{
     278  int k=size(v);
     279  int i;
     280  int zaehler=0;
     281  int sum=0;
     282  for(i=1;i<=k;i++)
     283   {
     284     if(v[i]!=0)
     285      {
     286        zaehler++;
     287        sum=sum+v[i];
     288      }
     289   }
     290  list l=zaehler,sum;
     291  return(l);
     292}
     293
     294
     295
     296proc modd (poly f, poly g)
     297{
     298  poly result=f-(f/g)*g;
     299  return(result);
     300}
Note: See TracChangeset for help on using the changeset viewer.