Changeset 192bef4 in git


Ignore:
Timestamp:
Jan 22, 2003, 6:35:39 PM (21 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
e2f5202c134ce37732c7ae7c16e6c964c93813f3
Parents:
88531526db18f23a3fcd4937830c69e1da7ea986
Message:
*hannes: pSLen gets len pararam


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

Legend:

Unmodified
Added
Removed
  • Singular/tgb.cc

    r8853152 r192bef4  
    1111#ifdef LEN_VAR1
    1212// erste Variante: Laenge: Anzahl der Monome
    13 int pSLength(poly p) {
    14   return pLength(p); }
     13int pSLength(poly p, int l) {
     14  return l; }
    1515int kSBucketLength(kBucket* bucket) {return bucket_guess(bucket);}
    1616#endif
     
    1818#ifdef LEN_VAR2
    1919// 2. Variante: Laenge: Platz fuer die Koeff.
    20 int pSLength(poly p)
     20int pSLength(poly p,int l)
    2121{
    2222  int s=0;
     
    3030  for (i=MAX_BUCKET;i>=0;i--)
    3131  {
    32     s+=pSLength(b->buckets[i]);
     32    s+=pSLength(b->buckets[i],0);
    3333  }
    3434  return s;
     
    3838#ifdef LEN_VAR3
    3939// 3.Variante: Laenge: Platz fuer Leitk * Monomanzahl
    40 int pSLength(poly p)
     40int pSLength(poly p,int l)
    4141{
    4242  int c=nSize(pGetCoeff(p))+1;
    43   return c*pLength(p);
     43  return c*l /*pLength(p)*/;
    4444}
    4545int kSBucketLength(kBucket* b)
     
    5050  for (i=MAX_BUCKET;i>0;i--)
    5151  {
    52     s+=pLength(b->buckets[i]);
     52    s+=b->buckets_length[i] /*pLength(b->buckets[i])*/;
    5353  }
    5454  return s*c;
     
    5858#ifdef LEN_VAR4
    5959// 4.Variante: Laenge: Platz fuer Leitk * (1+Platz fuer andere Koeff.)
    60 int pSLength(poly p)
     60int pSLength(poly p, int l)
    6161{
    6262  int s=1;
     
    7474  {
    7575    if(b->buckets[i]==NULL) continue;
    76     s+=pSLength(b->buckets[i]);
     76    s+=pSLength(b->buckets[i],0);
    7777  }
    7878  return s*c;
     
    300300  int i;
    301301  if (c->is_char0)
    302        i=simple_posInS(c->strat,h,pSLength(h),c->is_char0);
     302       i=simple_posInS(c->strat,h,pSLength(h,len),c->is_char0);
    303303  else
    304304    i=simple_posInS(c->strat,h,len,c->is_char0);
     
    321321 
    322322  if(c->strat->lenSw)
    323     c->strat->lenSw[i]=pSLength(P.p);
     323    c->strat->lenSw[i]=pSLength(P.p,len);
    324324 
    325325 
     
    13831383          int new_pos;
    13841384          if(c->is_char0)
    1385             new_pos=simple_posInS(c->strat,sec_copy,pSLength(sec_copy),c->is_char0);//hac
     1385            new_pos=simple_posInS(c->strat,sec_copy,
     1386                                  pSLength(sec_copy,new_length),
     1387                                  c->is_char0);//hac
    13861388          else
    13871389            new_pos=simple_posInS(c->strat,sec_copy,new_length,c->is_char0);//hack
     
    14271429              c->strat->lenS[old_pos]=new_length;
    14281430              if(c->strat->lenSw)
    1429                 c->strat->lenS[old_pos]=pSLength(sec_copy);
     1431                c->strat->lenS[old_pos]=pSLength(sec_copy,new_length);
    14301432              int i=0;
    14311433              for(i=new_pos;i<old_pos;i++){
     
    16041606                    int new_pos;
    16051607          if(c->is_char0)
    1606             new_pos=simple_posInS(c->strat,sec_copy,pSLength(sec_copy),c->is_char0);//hac
     1608            new_pos=simple_posInS(c->strat,sec_copy,
     1609                                  pSLength(sec_copy,new_length),
     1610                                  c->is_char0);//hac
    16071611          else
    16081612            new_pos=simple_posInS(c->strat,sec_copy,new_length,c->is_char0);//hack
     
    16381642              c->strat->lenS[old_pos]=new_length;
    16391643              if(c->strat->lenSw)
    1640                 c->strat->lenS[old_pos]=pSLength(sec_copy);
     1644                c->strat->lenS[old_pos]=pSLength(sec_copy,new_length);
    16411645              int i=0;
    16421646              for(i=new_pos;i<old_pos;i++){
     
    19131917  while (n<PAR_N) {
    19141918    if
    1915       (p=find_next_pair2(c, TRUE)) //the = is wanted
     1919      ((p=find_next_pair2(c, TRUE))!=NULL) //the = is wanted
    19161920    {
    19171921      if(p->i<0){
     
    22302234      int new_pos;
    22312235      if (c->is_char0)
    2232         simple_posInS(c->strat,c->S->m[i],pSLength(c->S->m[i]),c->is_char0);
     2236        simple_posInS(c->strat,c->S->m[i],pSLength(c->S->m[i],c->lengths[i]),c->is_char0);
    22332237      else     
    22342238        simple_posInS(c->strat,c->S->m[i],c->lengths[i],c->is_char0);
     
    22572261      c->strat->lenS[old_pos]=c->lengths[i];
    22582262      if (c->strat->lenSw)
    2259         c->strat->lenSw[old_pos]=pSLength(c->S->m[i]);
     2263        c->strat->lenSw[old_pos]=pSLength(c->S->m[i],c->lengths[i]);
    22602264
    22612265      if (new_pos<old_pos)
Note: See TracChangeset for help on using the changeset viewer.