Changeset 30e184 in git


Ignore:
Timestamp:
Apr 20, 2021, 3:24:46 PM (3 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
805315e6bd818709b77fe41703334096a97e6a52
Parents:
ddebd75a4ce9e60424c1454a22dee815afe211fe
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2021-04-20 15:24:46+02:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2021-04-20 15:28:45+02:00
Message:
fix: liftstd with 2 args (and clean up)
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • Tst/Short/ok_s.lst

    rddebd7 r30e184  
    99bug_heuristic
    1010bug_imap_alg
     11bug_liftstd2
    1112bug_liftstd4
    1213bug_mem_Z
  • kernel/GBEngine/kLiftstd.cc

    rddebd7 r30e184  
    2525#endif
    2626
    27 static poly kSplitAt(int k,poly p, const ring r)
    28 {
    29   if((p==NULL) || (p->next==NULL)) return NULL;
    30   while(p_GetComp(p->next,r)<=k)
    31   {
    32     pIter(p);
    33     if (p->next==NULL) return NULL;
    34   }
    35   poly t=p->next;
    36   p->next=NULL;
    37   return t;
    38 }
    39 static poly kSplitAt(int k,TObject* h,int *l,kStrategy strat)
     27static poly kSplitAt(int k,TObject* h,kStrategy strat)
    4028{
    4129  poly p;
     
    5341    p=h->t_p;
    5442  if (p->next==NULL) return NULL;
    55   int ll=1;
    5643  const ring tailRing=strat->tailRing;
    5744  while(p_GetComp(p->next,tailRing)<=k)
    5845  {
    5946    pIter(p);
    60     *l=ll;
    61     if ((p==NULL)||(p->next==NULL)) return NULL;
    62     ll++;
     47    if ((p==NULL)||(p->next==NULL))
     48    {
     49      h->pLength=0; // force re-computation
     50      return NULL;
     51    }
    6352  }
    6453  poly t=p->next;
    6554  p->next=NULL;
    66   *l=ll;
     55  h->pLength=0; // force re-computation
    6756  return t;
    6857}
     
    9786  }
    9887  if (p->next==NULL) return NULL;
    99   while(p_GetComp(p->next,tailRing)<=k) pIter(p);
     88  while(p_GetComp(p->next,tailRing)<=k)
     89  {
     90    pIter(p);
     91    if (p->next==NULL) break;
     92  }
    10093  poly t=p->next;
    10194  p->next=NULL;
     
    10598    kBucketInit(h->bucket,pr,l);
    10699  }
    107   return t;
    108 }
    109 static poly kTailAt(int k,TObject* h,kStrategy strat)
    110 {
    111   poly p;
    112   if (h->t_p!=NULL)
    113     p=h->t_p;
    114   else
    115     p=h->p;
    116   assume(p_GetComp(p,strat->tailRing)<=k);
    117   if (p->next==NULL) return NULL;
    118   const ring tailRing=strat->tailRing;
    119   while(p_GetComp(p->next,tailRing)<=k) pIter(p);
    120   poly t=p->next;
    121100  return t;
    122101}
     
    132111  if ((h->p!=NULL)&&(h->t_p!=NULL)) pNext(h->p)=pNext(h->t_p);
    133112}
    134 static void kAppend(poly t,LObject* h)
    135 {
    136   if (h->bucket!=NULL)
    137   {
    138     int l=-1;
    139     kBucket_Add_q(h->bucket,t,&l);
    140   }
    141   else
    142   {
    143     poly p;
    144     if (h->t_p!=NULL)
    145       p=h->t_p;
    146     else
    147       p=h->p;
    148     while(p->next!=NULL) pIter(p);
    149     p->next=t;
    150     if ((h->p!=NULL)&&(h->t_p!=NULL)) pNext(h->p)=pNext(h->t_p);
    151   }
    152 }
    153 
    154113static poly lazyComp(number* A, poly* M,poly* T,int index,poly s,int *l,const ring tailR)
    155114{
     
    184143  assume(h->FDeg == h->pFDeg());
    185144  poly h_p;
    186   int i,j,at,pass,ei, ii, h_d,ci;
     145  int i,j,pass,ei, ii, h_d,ci;
    187146  unsigned long not_sev;
    188147  long reddeg,d;
     
    282241    int l_orig=strat->T[ii].pLength;
    283242    // split strat->T[ii]
    284     poly T_tail=kSplitAt(strat->syzComp,&strat->T[ii],&strat->T[ii].pLength,strat);
     243    poly T_tail=kSplitAt(strat->syzComp,&strat->T[ii],strat);
     244    h->pLength=0; // force re-computation of length
    285245    ksReducePoly(h,&(strat->T[ii]),NULL,&A[pass],&C[pass], strat);
    286246    // restore T[ii]:
Note: See TracChangeset for help on using the changeset viewer.