Changeset df8937 in git


Ignore:
Timestamp:
Nov 16, 2000, 10:54:52 AM (23 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
e7cc147e965c4ecf804be1d81593e22ca4ed57eb
Parents:
84038fa065e073d715909526ba76ad3f0f0455d8
Message:
* towards tailRings for local std


git-svn-id: file:///usr/local/Singular/svn/trunk@4729 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Singular/kInline.cc

    r84038f rdf8937  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: kInline.cc,v 1.15 2000-11-14 16:04:53 obachman Exp $
     9 *  Version: $Id: kInline.cc,v 1.16 2000-11-16 09:54:49 obachman Exp $
    1010 *******************************************************************/
    1111#ifndef KINLINE_CC
     
    181181  length = 0;
    182182  pLength = 0;
     183  FDeg = 0;
     184  is_normalized = FALSE;
    183185}
    184186
     
    351353  return tailRing->pFDeg(t_p, tailRing);
    352354}
    353 
     355KINLINE long sTObject::SetpFDeg()
     356{
     357  FDeg = this->pFDeg();
     358  return FDeg;
     359}
     360KINLINE long sTObject::GetpFDeg() const
     361{
     362  assume(FDeg == this->pFDeg());
     363  return FDeg;
     364}
    354365KINLINE long sTObject::pLDeg()
    355366{
    356367  return ::pLDeg(GetLmTailRing(), &length, tailRing);
    357368}
    358 
    359 KINLINE long sTObject::SetLengthEcartReturnLDeg()
    360 {
     369KINLINE long sTObject::SetDegStuffReturnLDeg()
     370{
     371  FDeg = this->pFDeg();
    361372  long d = this->pLDeg();
    362   ecart = d - this->pFDeg();
     373  ecart = d - FDeg;
    363374  return d;
    364375}
     
    378389{
    379390  assume(p != NULL);
    380   ::pNorm(p);
    381   if (t_p != NULL)
    382     pSetCoeff0(t_p, pGetCoeff(p));
     391  if (! is_normalized)
     392  {
     393    ::pNorm(p);
     394    if (t_p != NULL)
     395      pSetCoeff0(t_p, pGetCoeff(p));
     396    is_normalized = TRUE;
     397  }
    383398}
    384399 
     
    537552    sev = p_GetShortExpVector(p, currRing);
    538553  }
     554}
     555
     556KINLINE long sLObject::pLDeg()
     557{
     558  poly tp = GetLmTailRing();
     559  assume(tp != NULL);
     560  if (bucket != NULL)
     561  {
     562    int i = kBucketCanonicalize(bucket);
     563    pNext(tp) = bucket->buckets[i];
     564    long ldeg = ::pLDeg(tp, &length, tailRing);
     565    pNext(tp) = NULL;
     566    return ldeg;
     567  }
     568  else
     569    return ::pLDeg(tp, &length, tailRing);
     570}
     571KINLINE long sLObject::SetDegStuffReturnLDeg()
     572{
     573  FDeg = this->pFDeg();
     574  long d = this->pLDeg();
     575  ecart = d - FDeg;
     576  return d;
     577}
     578KINLINE long sLObject::SetLength()
     579{
     580  // this can be improved
     581  this->pLDeg();
     582  return length;
     583}
     584KINLINE long sLObject::MinComp()
     585{
     586  poly tp = GetLmTailRing();
     587  assume(tp != NULL);
     588  if (bucket != NULL)
     589  {
     590    int i = kBucketCanonicalize(bucket);
     591    pNext(tp) = bucket->buckets[i];
     592    long m = p_MinComp(tp, tailRing);
     593    pNext(tp) = NULL;
     594    return m;
     595  }
     596  else
     597    return p_MinComp(tp, tailRing);
    539598}
    540599
  • Singular/kstd1.cc

    r84038f rdf8937  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd1.cc,v 1.62 2000-11-14 16:24:47 obachman Exp $ */
     4/* $Id: kstd1.cc,v 1.63 2000-11-16 09:54:50 obachman Exp $ */
    55/*
    66* ABSTRACT:
     
    100100        pDelete(&(pNext(p1)));
    101101        (*p).ecart = pLDeg((*p).p,&((*p).length))-o;
     102        p->pLength = 0;
    102103      }
    103104      else
     
    133134    LObject L= *h;
    134135    L.Copy();
     136    h->GetP();
    135137    ret = ksReducePoly(&L, with, strat->kNoether, NULL, strat);
    136138    if (ret)
     
    142144                                                       strat->tailRing));
    143145    }
    144     h->CanonicalizeP();
    145146    enterT(*h,strat);
    146147    *h = L;
     
    157158}
    158159
    159 #if 1
     160#if 0
    160161/*2
    161162* reduces h with elements from T choosing first possible
     
    178179    if (j > strat->tl)
    179180    {
     181      if (strat->honey) pLDeg((*h).p,&((*h).length));
    180182      return 1;
    181183    }
     
    227229        if (strat->Ll >= 0) /*- L is not empty -*/
    228230        {
     231          if (strat->honey) pLDeg((*h).p,&((*h).length));
    229232          at = strat->posInL(strat->L,strat->Ll,(*h),strat);
    230233          if (at <= strat->Ll)
     
    255258        else
    256259          (*h).ecart = d-pFDeg((*h).p)+ei-(*h).ecart;
    257         pLDeg((*h).p,&((*h).length));
     260        // pLDeg((*h).p,&((*h).length));
    258261        //(*h).length = pLength((*h).p);
    259262      }
     
    280283      && ((d >= reddeg) || (pass > strat->LazyPass)))
    281284      {
     285        if (strat->honey) pLDeg((*h).p,&((*h).length));
    282286        at = strat->posInL(strat->L,strat->Ll,*h,strat);
    283287        if (at <= strat->Ll)
     
    310314}
    311315#else
    312 
    313316int redEcart (LObject* h,kStrategy strat)
    314317{
     
    318321  int pass = 0;
    319322
    320   d = h->pFDeg()+ h->ecart;
     323  d = h->GetpFDeg()+ h->ecart;
    321324  reddeg = strat->LazyDegree+d;
    322325  h->SetShortExpVector();
     
    325328    j = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, h);
    326329    if (j < 0)
     330    {
     331      if (strat->honey) h->SetLength();
    327332      return 1;
     333    }
    328334
    329335    ei = strat->T[j].ecart;
     
    341347        /*- takes the first possible with respect to ecart -*/
    342348        i++;
    343         i = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, h, i);
    344         if (i < 0) break;
    345         if (strat->T[i].ecart < ei || (strat->T[i].ecart == ei &&
    346                                        strat->T[i].length < li))
     349//        i = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, h, i);
     350        if (i > strat->tl) break;
     351        if ((strat->T[i].ecart < ei || (strat->T[i].ecart == ei &&
     352                                        strat->T[i].length < li))
     353            &&
     354            pLmShortDivisibleBy(strat->T[i].p, strat->sevT[i], h->p, ~h->sev))
    347355        {
    348356          // the polynomial to reduce with is now
     
    364372      if (strat->Ll >= 0) /*- L is not empty -*/
    365373      {
    366         h->SetLmCurrentRing();
     374        h->SetLmCurrRing();
     375        if (strat->honey) h->SetLength();
     376        assume(h->FDeg == h->pFDeg());
    367377        at = strat->posInL(strat->L,strat->Ll,(*h),strat);
    368378        if (at <= strat->Ll)
    369379        {
    370380          /*- h will not become the next element to reduce -*/
     381          h->CanonicalizeP();
    371382          enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at);
    372383#ifdef KDEBUG
     
    380391    }
    381392       
    382     // now we fiannly can reduce
     393    // now we fianlly can reduce
    383394    doRed(h,&(strat->T[ii]),strat->fromT,strat);
    384395    strat->fromT=FALSE;
     
    387398    if (h->IsNull())
    388399    {
    389       if (h->lcm!=NULL) pLmFree((*h).lcm);
     400      if (h->lcm!=NULL) pLmFree(h->lcm);
    390401      h->Clear();
    391402      return 0;
     
    394405    // NO!
    395406    h->SetShortExpVector();
    396     /*computes the ecart*/
     407    h->SetpFDeg();
    397408    if (strat->honey)
    398409    {
    399       if (ei <= (*h).ecart)
    400         (*h).ecart = d-pFDeg((*h).p);
     410      if (ei <= h->ecart)
     411        h->ecart = d-h->GetpFDeg();
    401412      else
    402         (*h).ecart = d-pFDeg((*h).p)+ei-(*h).ecart;
    403       pLDeg((*h).p,&((*h).length));
    404       //(*h).length = pLength((*h).p);
     413        h->ecart = d-h->GetpFDeg()+ei-h->ecart;
    405414    }
    406415    else
    407       (*h).ecart = pLDeg((*h).p,&((*h).length))-pFDeg((*h).p);
     416      // this has the side effect of setting h->length
     417      h->ecart = h->pLDeg() - h->GetpFDeg();
     418
    408419    if (strat->syzComp!=0)
    409420    {
    410       if ((strat->syzComp>0) && (pMinComp((*h).p) > strat->syzComp))
    411       {
     421      if ((strat->syzComp>0) && (h->MinComp() > strat->syzComp))
     422      {
     423        if (strat->honey) h->SetLength();
     424#ifdef KDEBUG
    412425        if (TEST_OPT_DEBUG) PrintS(" > syzComp\n");
     426#endif
    413427        return -2;
    414428      }
    415 
    416429    }
    417430    /*- try to reduce the s-polynomial -*/
    418431    pass++;
    419     d = pFDeg((*h).p)+(*h).ecart;
     432    d = h->GetpFDeg()+h->ecart;
    420433    /*
    421434     *test whether the polynomial should go to the lazyset L
     
    426439        && ((d >= reddeg) || (pass > strat->LazyPass)))
    427440    {
     441      h->SetLmCurrRing();
     442      if (strat->honey) h->SetLength();
     443      assume(h->FDeg == h->pFDeg());
    428444      at = strat->posInL(strat->L,strat->Ll,*h,strat);
    429445      if (at <= strat->Ll)
    430446      {
    431         i=strat->sl+1;
    432         do
    433         {
    434           i--;
    435           if (i<0) return 1;
    436         } while (!pLmShortDivisibleBy(strat->S[i], strat->sevS[i],
    437                                       (*h).p, not_sev));
     447        if (kFindDivisibleByInS(strat->S, strat->sevS, strat->sl, h) < 0)
     448          return 1;
     449        h->CanonicalizeP();
    438450        enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at);
     451#ifdef KDEBUG
    439452        if (TEST_OPT_DEBUG) Print(" degree jumped; ->L%d\n",at);
    440         (*h).p = NULL;
     453#endif
     454        h->Clear();
    441455        return -1;
    442456      }
     
    465479  if (! strat->homog)
    466480  {
    467     d = h->pFDeg() + h->ecart;
     481    d = h->GetpFDeg() + h->ecart;
    468482    reddeg = strat->LazyDegree+d;
    469483  }
     
    473487    j = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, h);
    474488    if (j < 0)
     489    {
     490      if (! strat->homog)
     491        h->SetDegStuffReturnLDeg();
    475492      return 1;
     493    }
    476494
    477495    if (!TEST_OPT_INTSTRATEGY)
     
    497515    if (h->IsNull())
    498516    {
    499       if (h->lcm!=NULL) pLmFree((*h).lcm);
     517      if (h->lcm!=NULL) pLmFree(h->lcm);
    500518      h->Clear();
    501519      return 0;
     
    506524    {
    507525      if ((strat->syzComp>0) &&
    508           (p_MinComp(h->GetLmTailRing(), h->tailRing) > strat->syzComp))
     526          (h->MinComp() > strat->syzComp))
    509527      {
    510528#ifdef KDEBUG
     
    516534    if (!strat->homog)
    517535    {
    518       d = h->SetLengthEcartReturnLDeg();
     536      d = h->SetDegStuffReturnLDeg();
    519537      /*- try to reduce the s-polynomial -*/
    520538      pass++;
     
    871889                                         strat->L[i].p2,
    872890                                         strat->kNoether);
     891        strat->L[i].SetpFDeg();
    873892        strat->L[i].ecart = pLDeg(strat->L[i].p,&strat->L[i].length)
    874                            -pFDeg(strat->L[i].p);
     893                           -strat->L[i].GetpFDeg();
    875894      }
    876895    }
     
    898917    /*- tries to cancel a unit: -*/
    899918    cancelunit(&p);
    900     if (p.p != strat->T[i].p) strat->sevT[i] = pGetShortExpVector(p.p);
     919    if (p.p != strat->T[i].p)
     920    {
     921      strat->sevT[i] = pGetShortExpVector(p.p);
     922      p.SetpFDeg();
     923    }
    901924    strat->T[i] = p;
    902925    i++;
     
    914937    if (TEST_OPT_WEIGHTM)
    915938    {
    916       pFDeg=pFDegOld;
     939      if (pFDegOld != pFDeg)
     940      {
     941        pFDeg=pFDegOld;
     942        int i;
     943        for (i =0; i<=strat->Ll; i++)
     944        {
     945          strat->L[i].SetpFDeg();
     946        }
     947        for (i=0; i<=strat->tl; i++)
     948        {
     949          strat->T[i].SetpFDeg();
     950        }
     951      }
    917952      pLDeg=pLDegOld;
    918953      if (ecartWeights)
  • Singular/kstd2.cc

    r84038f rdf8937  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd2.cc,v 1.60 2000-11-14 16:04:55 obachman Exp $ */
     4/* $Id: kstd2.cc,v 1.61 2000-11-16 09:54:50 obachman Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: alg. of Buchberger
     
    138138    if (h->GetLmTailRing() == NULL)
    139139    {
    140       if (h->lcm!=NULL) pLmFree((*h).lcm);
    141 #ifdef KDEBUG
    142       (*h).lcm=NULL;
     140      if (h->lcm!=NULL) pLmFree(h->lcm);
     141#ifdef KDEBUG
     142      h->lcm=NULL;
    143143#endif
    144144      return 0;
     
    158158  int j = 0;
    159159  int pass = 0;
    160   int reddeg = h->pFDeg();
     160  assume(h->pFDeg() == h->FDeg);
     161  int reddeg = h->FDeg;
    161162
    162163  h->SetShortExpVector();
     
    189190    if (h->GetLmTailRing() == NULL)
    190191    {
    191       if (h->lcm!=NULL) pLmFree((*h).lcm);
    192 #ifdef KDEBUG
    193       (*h).lcm=NULL;
     192      if (h->lcm!=NULL) pLmFree(h->lcm);
     193#ifdef KDEBUG
     194      h->lcm=NULL;
    194195#endif
    195196      return 0;
    196197    }
    197198    h->SetShortExpVector();
    198     d = h->pFDeg();
     199    d = h->SetpFDeg();
    199200    /*- try to reduce the s-polynomial -*/
    200201    pass++;
     
    232233{
    233234  if (strat->tl<0) return 1;
    234 
    235   poly pi, h_p;
     235  assume(h->FDeg == h->pFDeg());
     236
     237  poly h_p;
    236238  int i,j,at,reddeg,d,pass,ei, ii, h_d;
    237239  unsigned long not_sev;
    238240
    239241  pass = j = 0;
    240   d = reddeg = h->pFDeg() + h->ecart;
     242  d = reddeg = h->FDeg + h->ecart;
    241243  h->SetShortExpVector();
    242244  h_p = h->GetLmTailRing();
     
    247249    if (j < 0) return 1;
    248250
    249     pi = strat->T[j].p;
    250251    ei = strat->T[j].ecart;
    251252    ii = j;
     
    261262      if (i > strat->tl)
    262263        break;
    263       if (ei <= (*h).ecart)
     264      if (ei <= h->ecart)
    264265        break;
    265266      if ((strat->T[i].ecart < ei) &&
     
    270271         * the polynomial to reduce with is now;
    271272         */
    272         pi = strat->T[i].p;
    273273        ei = strat->T[i].ecart;
    274274        ii = i;
     
    279279     * end of search: have to reduce with pi
    280280     */
    281     if ((pass!=0) && (ei > (*h).ecart))
     281    if ((pass!=0) && (ei > h->ecart))
    282282    {
    283283      h->SetLmCurrRing();
     
    329329    if (h_p == NULL)
    330330    {
    331       if (h->lcm!=NULL) pLmFree((*h).lcm);
    332 #ifdef KDEBUG
    333       (*h).lcm=NULL;
     331      if (h->lcm!=NULL) pLmFree(h->lcm);
     332#ifdef KDEBUG
     333      h->lcm=NULL;
    334334#endif
    335335      return 0;
     
    337337    h->SetShortExpVector();
    338338    not_sev = ~ h->sev;
    339     h_d = h->pFDeg();
     339    h_d = h->SetpFDeg();
    340340    /* compute the ecart */
    341     if (ei <= (*h).ecart)
    342       (*h).ecart = d-h_d;
     341    if (ei <= h->ecart)
     342      h->ecart = d-h_d;
    343343    else
    344       (*h).ecart = d-h_d+ei-(*h).ecart;
     344      h->ecart = d-h_d+ei-h->ecart;
    345345    /*
    346346     * try to reduce the s-polynomial h
     
    350350     */
    351351    pass++;
    352     d = h_d +(*h).ecart;
     352    d = h_d + h->ecart;
    353353    if ((strat->Ll >= 0) && ((d > reddeg) || (pass > strat->LazyPass)))
    354354    {
  • Singular/kutil.cc

    r84038f rdf8937  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kutil.cc,v 1.77 2000-11-14 16:04:56 obachman Exp $ */
     4/* $Id: kutil.cc,v 1.78 2000-11-16 09:54:51 obachman Exp $ */
    55/*
    66* ABSTRACT: kernel: utils for kStd
     
    141141        L->ecart = 0;
    142142        L->length = 1;
    143         L->pLength = 1;
     143        L->pLength = 1; // let pLength be determined dynamically
    144144        if (L->t_p != NULL && pNext(L->t_p) != NULL)
    145145          pNext(L->t_p) = NULL;
     
    463463      T->pLength != pLength(p))
    464464  {
    465     return dReportError("%c[%d] length error: has %d, specified to have %d",
     465    return dReportError("%c[%d] pLength error: has %d, specified to have %d",
    466466                        TN, i , pLength(p), T->pLength);
     467  }
     468
     469  // check FDeg,  for elements in L and T
     470  if (i >= 0 && (TN == 'T' || TN == 'L'))
     471  {
     472    // FDeg has ir element from T of L set
     473    if (T->FDeg  != T->pFDeg())
     474      return dReportError("%c[%d] FDeg error: has %d, specified to have %d",
     475                          TN, i , T->pFDeg(), T->FDeg);
     476  }
     477
     478  // check is_normalized for elements in T
     479  if (i >= 0 && TN == 'T')
     480  {
     481    if (T->is_normalized && ! nIsOne(pGetCoeff(p)))
     482      return dReportError("T[%d] is_normalized error", i);
     483
    467484  }
    468485  return TRUE;
     
    483500    poly p;
    484501    L->GetLm(p, r);
    485 #if 0
    486502    if (L->sev != 0 && p_GetShortExpVector(p, r) != L->sev)
    487503    {
     
    489505                          lpos, p_GetShortExpVector(p, r), L->sev);
    490506    }
    491 #endif
    492507  }
    493508  r_assume(L->max == NULL);
     
    735750{
    736751  int i;
    737 
     752  // this should be corrected
     753  p.FDeg = p.pFDeg();
    738754  if ((*length)>=0)
    739755  {
     
    752768void initEcartNormal (LObject* h)
    753769{
    754   poly h_p = h->GetLmTailRing();
    755   if (h->bucket != NULL)
    756   {
    757     assume(pNext(h_p) == NULL);
    758     int i = kBucketCanonicalize(h->bucket);
    759     pNext(h_p) = h->bucket->buckets[i];
    760   }
    761   h->ecart = pLDeg(h_p,&(h->length), h->tailRing)-pFDeg(h_p, h->tailRing);
    762   if (h->bucket != NULL) pNext(h_p) = NULL;
     770  h->FDeg = h->pFDeg();
     771  h->ecart = h->pLDeg() - h->FDeg;
    763772}
    764773
    765774void initEcartBBA (LObject* h)
    766775{
     776  h->FDeg = h->pFDeg();
    767777  (*h).ecart = 0;
    768 //#ifdef KDEBUG
    769778  (*h).length = 0;
    770 //#endif
    771779}
    772780
    773781void initEcartPairBba (LObject* Lp,poly f,poly g,int ecartF,int ecartG)
    774782{
    775 //#ifdef KDEBUG
     783  Lp->FDeg = Lp->pFDeg();
    776784  (*Lp).ecart = 0;
    777785  (*Lp).length = 0;
    778 //#endif
    779786}
    780787
    781788void initEcartPairMora (LObject* Lp,poly f,poly g,int ecartF,int ecartG)
    782789{
     790  Lp->FDeg = Lp->pFDeg();
    783791  (*Lp).ecart = max(ecartF,ecartG);
    784   (*Lp).ecart = (*Lp).ecart-(pFDeg((*Lp).p)-pFDeg((*Lp).lcm));
    785 //#ifdef KDEBUG
     792  (*Lp).ecart = (*Lp).ecart- (Lp->FDeg -pFDeg((*Lp).lcm));
    786793  (*Lp).length = 0;
    787 //#endif
    788794}
    789795
     
    16461652
    16471653  int o = pFDeg(p.p);
    1648   int op = pFDeg(set[length].p);
     1654  int op = set[length].GetpFDeg();
    16491655
    16501656  if ((op < o)
     
    16601666    if (an >= en-1)
    16611667    {
    1662       op= pFDeg(set[an].p);
     1668      op= set[an].GetpFDeg();
    16631669      if ((op > o)
    16641670      || (( op == o) && (pLmCmp(set[an].p,p.p) == pOrdSgn)))
     
    16671673    }
    16681674    i=(an+en) / 2;
    1669     op = pFDeg(set[i].p);
     1675    op = set[i].GetpFDeg();
    16701676    if (( op > o)
    16711677    || (( op == o) && (pLmCmp(set[i].p,p.p) == pOrdSgn)))
     
    16861692
    16871693  int o = pFDeg(p.p);
    1688   int op = pFDeg(set[length].p);
     1694  int op = set[length].GetpFDeg();
    16891695
    16901696  if (( op < o)
     
    17011707    if (an >= en-1)
    17021708    {
    1703       op = pFDeg(set[an].p);
     1709      op = set[an].GetpFDeg();
    17041710      if (( op > o)
    17051711      || (( op == o) && (set[an].length > p.length))
     
    17101716    }
    17111717    i=(an+en) / 2;
    1712     op = pFDeg(set[i].p);
     1718    op = set[i].GetpFDeg();
    17131719    if (( op > o)
    17141720    || (( op == o) && (set[i].length > p.length))
     
    17321738  int o = pFDeg(p.p);
    17331739
    1734   if (pFDeg(set[length].p) <= o)
     1740  if (set[length].GetpFDeg() <= o)
    17351741    return length+1;
    17361742
     
    17421748    if (an >= en-1)
    17431749    {
    1744       if (pFDeg(set[an].p) > o)
     1750      if (set[an].GetpFDeg() > o)
    17451751        return an;
    17461752      return en;
    17471753    }
    17481754    i=(an+en) / 2;
    1749     if (pFDeg(set[i].p) > o)
     1755    if (set[i].GetpFDeg() > o)
    17501756      en=i;
    17511757    else
     
    17671773 * loop
    17681774 * {
    1769  *   if ((pFDeg(set[j].p)+set[j].ecart > o)
    1770  *   || ((pFDeg(set[j].p)+set[j].ecart == o)
     1775 *   if ((set[j].GetpFDeg()+set[j].ecart > o)
     1776 *   || ((set[j].GetpFDeg()+set[j].ecart == o)
    17711777 *     && (pLmCmp(set[j].p,p.p) == pOrdSgn)))
    17721778 *   {
     
    17821788
    17831789  int o = pFDeg(p.p) + p.ecart;
    1784   int op = pFDeg(set[length].p)+set[length].ecart;
     1790  int op = set[length].GetpFDeg()+set[length].ecart;
    17851791
    17861792  if ((op < o)
     
    17961802    if (an >= en-1)
    17971803    {
    1798       op = pFDeg(set[an].p)+set[an].ecart;
     1804      op = set[an].GetpFDeg()+set[an].ecart;
    17991805      if (( op > o)
    18001806      || (( op  == o) && (pLmCmp(set[an].p,p.p) == pOrdSgn)))
     
    18031809    }
    18041810    i=(an+en) / 2;
    1805     op = pFDeg(set[i].p)+set[i].ecart;
     1811    op = set[i].GetpFDeg()+set[i].ecart;
    18061812    if (( op > o)
    18071813    || (( op == o) && (pLmCmp(set[i].p,p.p) == pOrdSgn)))
     
    18421848
    18431849  int o = pFDeg(p.p) + p.ecart;
    1844   int op = pFDeg(set[length].p)+set[length].ecart;
     1850  int op = set[length].GetpFDeg()+set[length].ecart;
    18451851
    18461852  if ((op < o)
     
    18571863    if (an >= en-1)
    18581864    {
    1859       op = pFDeg(set[an].p)+set[an].ecart;
     1865      op = set[an].GetpFDeg()+set[an].ecart;
    18601866      if (( op > o)
    18611867      || (( op == o) && (set[an].ecart < p.ecart))
     
    18661872    }
    18671873    i=(an+en) / 2;
    1868     op = pFDeg(set[i].p)+set[i].ecart;
     1874    op = set[i].GetpFDeg()+set[i].ecart;
    18691875    if ((op > o)
    18701876    || (( op == o) && (set[i].ecart < p.ecart))
     
    18941900  if (pGetComp(set[length].p)*cc == c)
    18951901  {
    1896     int op = pFDeg(set[length].p)+set[length].ecart;
     1902    int op = set[length].GetpFDeg()+set[length].ecart;
    18971903    if ((op < o)
    18981904    || ((op == o) && (set[length].ecart > p.ecart))
     
    19131919      if (pGetComp(set[an].p)*cc == c)
    19141920      {
    1915         int op = pFDeg(set[an].p)+set[an].ecart;
     1921        int op = set[an].GetpFDeg()+set[an].ecart;
    19161922        if ((op > o)
    19171923        || ((op == o) && (set[an].ecart < p.ecart))
     
    19271933    else if (pGetComp(set[i].p)*cc == c)
    19281934    {
    1929       int op = pFDeg(set[i].p)+set[i].ecart;
     1935      int op = set[i].GetpFDeg()+set[i].ecart;
    19301936      if ((op > o)
    19311937      || ((op == o) && (set[i].ecart < p.ecart))
     
    19511957
    19521958  int o = p.ecart;
     1959  int op=pFDeg(p.p);
    19531960
    19541961  if (set[length].ecart < o)
     
    19561963  if (set[length].ecart == o)
    19571964  {
    1958      int oo=pFDeg(set[length].p);
    1959      int op=pFDeg(p.p);
     1965     int oo=set[length].GetpFDeg();
    19601966     if ((oo < op) || ((oo==op) && (set[length].length < p.length)))
    19611967       return length+1;
     
    19731979      if (set[an].ecart == o)
    19741980      {
    1975          int oo=pFDeg(set[an].p);
    1976          int op=pFDeg(p.p);
     1981         int oo=set[an].GetpFDeg();
    19771982         if((oo > op)
    19781983         || ((oo==op) && (set[an].length > p.length)))
     
    19861991    else if (set[i].ecart == o)
    19871992    {
    1988        int oo=pFDeg(set[i].p);
    1989        int op=pFDeg(p.p);
     1993       int oo=set[i].GetpFDeg();
    19901994       if ((oo > op)
    19911995       || ((oo == op) && (set[i].length > p.length)))
     
    20102014
    20112015  int d=pFDeg(p.p);
    2012   int op=pFDeg(set[length].p);
     2016  int op=set[length].GetpFDeg();
    20132017
    20142018  if ((op > d)
     
    20242028    if (an >= en-1)
    20252029    {
    2026       op=pFDeg(set[an].p);
     2030      op=set[an].GetpFDeg();
    20272031      if ((op > d)
    20282032      || ((op == d) && (p.p1!=NULL) && (set[an].p1==NULL))
     
    20322036    }
    20332037    i=(an+en) / 2;
    2034     op=pFDeg(set[i].p);
     2038    op=set[i].GetpFDeg();
    20352039    if ((op>d)
    20362040    || ((op==d) && (p.p1!=NULL) && (set[i].p1==NULL))
     
    20882092 * {
    20892093 *   if (j > length)            return j;
    2090  *   if ((pFDeg(set[j].p) < o)) return j;
    2091  *   if ((pFDeg(set[j].p) == o) && (pLmCmp(set[j].p,p.p) == -pOrdSgn))
     2094 *   if ((set[j].GetpFDeg() < o)) return j;
     2095 *   if ((set[j].GetpFDeg() == o) && (pLmCmp(set[j].p,p.p) == -pOrdSgn))
    20922096 *   {
    20932097 *     return j;
     
    21012105
    21022106  int o = pFDeg(p.p);
    2103   int op = pFDeg(set[length].p);
     2107  int op = set[length].GetpFDeg();
    21042108
    21052109  if ((op > o)
     
    21132117    if (an >= en-1)
    21142118    {
    2115       op = pFDeg(set[an].p);
     2119      op = set[an].GetpFDeg();
    21162120      if ((op > o)
    21172121      || ((op == o) && (pLmCmp(set[an].p,p.p) != -pOrdSgn)))
     
    21202124    }
    21212125    i=(an+en) / 2;
    2122     op = pFDeg(set[i].p);
     2126    op = set[i].GetpFDeg();
    21232127    if ((op > o)
    21242128    || ((op == o) && (pLmCmp(set[i].p,p.p) != -pOrdSgn)))
     
    21402144
    21412145  int o = pFDeg(p.p);
    2142   int op = pFDeg(set[length].p);
     2146  int op = set[length].GetpFDeg();
    21432147
    21442148  if ((op > o)
     
    21542158    if (an >= en-1)
    21552159    {
    2156       op = pFDeg(set[an].p);
     2160      op = set[an].GetpFDeg();
    21572161      if ((op > o)
    21582162      || ((op == o) && (set[an].length >2*p.length))
     
    21632167    }
    21642168    i=(an+en) / 2;
    2165     op = pFDeg(set[i].p);
     2169    op = set[i].GetpFDeg();
    21662170    if ((op > o)
    21672171    || ((op == o) && (set[i].length > 2*p.length))
     
    21872191  int o = pFDeg(p.p);
    21882192
    2189   if (pFDeg(set[length].p) > o)
     2193  if (set[length].GetpFDeg() > o)
    21902194    return length+1;
    21912195
     
    21972201    if (an >= en-1)
    21982202    {
    2199       if (pFDeg(set[an].p) >= o)
     2203      if (set[an].GetpFDeg() >= o)
    22002204        return en;
    22012205      return an;
    22022206    }
    22032207    i=(an+en) / 2;
    2204     if (pFDeg(set[i].p) >= o)
     2208    if (set[i].GetpFDeg() >= o)
    22052209      an=i;
    22062210    else
     
    22252229 * {
    22262230 *   if (j > length)                       return j;
    2227  *   if (pFDeg(set[j].p)+set[j].ecart < o) return j;
    2228  *   if ((pFDeg(set[j].p)+set[j].ecart == o)
     2231 *   if (set[j].GetpFDeg()+set[j].ecart < o) return j;
     2232 *   if ((set[j].GetpFDeg()+set[j].ecart == o)
    22292233 *   && (pLmCmp(set[j].p,p.p) == -pOrdSgn))
    22302234 *   {
     
    22392243
    22402244  int o = pFDeg(p.p) + p.ecart;
    2241   int op = pFDeg(set[length].p) + set[length].ecart;
     2245  int op = set[length].GetpFDeg() + set[length].ecart;
    22422246
    22432247  if ((op > o)
     
    22512255    if (an >= en-1)
    22522256    {
    2253       op = pFDeg(set[an].p) + set[an].ecart;
     2257      op = set[an].GetpFDeg() + set[an].ecart;
    22542258      if ((op > o)
    22552259      || ((op == o) && (pLmCmp(set[an].p,p.p) != -pOrdSgn)))
     
    22582262    }
    22592263    i=(an+en) / 2;
    2260     op = pFDeg(set[i].p) + set[i].ecart;
     2264    op = set[i].GetpFDeg() + set[i].ecart;
    22612265    if ((op > o)
    22622266    || ((op == o) && (pLmCmp(set[i].p,p.p) != -pOrdSgn)))
     
    22812285  int o = pFDeg(p.p) + p.ecart;
    22822286
    2283   if ((pFDeg(set[length].p) + set[length].ecart > o)
    2284   || ((pFDeg(set[length].p) + set[length].ecart == o)
     2287  if ((set[length].GetpFDeg() + set[length].ecart > o)
     2288  || ((set[length].GetpFDeg() + set[length].ecart == o)
    22852289     && (set[length].ecart > p.ecart))
    2286   || ((pFDeg(set[length].p) + set[length].ecart == o)
     2290  || ((set[length].GetpFDeg() + set[length].ecart == o)
    22872291     && (set[length].ecart == p.ecart)
    22882292     && (pLmCmp(set[length].p,p.p) != -pOrdSgn)))
     
    22952299    if (an >= en-1)
    22962300    {
    2297       if ((pFDeg(set[an].p) + set[an].ecart > o)
    2298       || ((pFDeg(set[an].p) + set[an].ecart == o)
     2301      if ((set[an].GetpFDeg() + set[an].ecart > o)
     2302      || ((set[an].GetpFDeg() + set[an].ecart == o)
    22992303         && (set[an].ecart > p.ecart))
    2300       || ((pFDeg(set[an].p) + set[an].ecart == o)
     2304      || ((set[an].GetpFDeg() + set[an].ecart == o)
    23012305         && (set[an].ecart == p.ecart)
    23022306         && (pLmCmp(set[an].p,p.p) != -pOrdSgn)))
     
    23052309    }
    23062310    i=(an+en) / 2;
    2307     if ((pFDeg(set[i].p) + set[i].ecart > o)
    2308     || ((pFDeg(set[i].p) + set[i].ecart == o)
     2311    if ((set[i].GetpFDeg() + set[i].ecart > o)
     2312    || ((set[i].GetpFDeg() + set[i].ecart == o)
    23092313       && (set[i].ecart > p.ecart))
    2310     || ((pFDeg(set[i].p) +set[i].ecart == o)
     2314    || ((set[i].GetpFDeg() +set[i].ecart == o)
    23112315       && (set[i].ecart == p.ecart)
    23122316       && (pLmCmp(set[i].p,p.p) != -pOrdSgn)))
     
    23162320  }
    23172321}
    2318 #if 0
     2322/*2
     2323* looks up the position of polynomial p in set
     2324* e is the ecart of p
     2325* set[length] is the smallest element in set with respect
     2326* to the ordering-procedure pComp
     2327*/
     2328int posInL17_c (const LSet set, const int length,
     2329                const LObject &p,const kStrategy strat)
    23192330{
    23202331  if (length<0) return 0;
    23212332
     2333  int cc = (-1+2*currRing->order[0]==ringorder_c);
     2334  /* cc==1 for (c,..), cc==-1 for (C,..) */
     2335  int c = pGetComp(p.p)*cc;
    23222336  int o = pFDeg(p.p) + p.ecart;
    2323   int ol = pFDeg(set[length].p) + set[length].ecart;
    2324 
    2325   if ((ol > o)
    2326   || ((ol == o)
    2327      && (set[length].ecart > p.ecart))
    2328   || ((ol == o)
    2329      && (set[length].ecart == p.ecart)
    2330      //&& (set[length].lp+set[length].length > p.lp+p.length))
    2331      && (set[length].length > p.length))
    2332   || ((ol == o)
    2333      && (set[length].ecart == p.ecart)
    2334      //&& (set[length].lp+set[length].length == p.lp+p.length)
    2335      && (set[length].length == p.length)
    2336      && (pLmCmp(set[length].p,p.p) != -pOrdSgn)))
     2337
     2338  if (pGetComp(set[length].p)*cc > c)
    23372339    return length+1;
     2340  if (pGetComp(set[length].p)*cc == c)
     2341  {
     2342    if ((set[length].GetpFDeg() + set[length].ecart > o)
     2343    || ((set[length].GetpFDeg() + set[length].ecart == o)
     2344       && (set[length].ecart > p.ecart))
     2345    || ((set[length].GetpFDeg() + set[length].ecart == o)
     2346       && (set[length].ecart == p.ecart)
     2347       && (pLmCmp(set[length].p,p.p) != -pOrdSgn)))
     2348      return length+1;
     2349  }
    23382350  int i;
    23392351  int an = 0;
     
    23432355    if (an >= en-1)
    23442356    {
    2345       ol = pFDeg(set[an].p) + set[an].ecart;
    2346       if ((ol > o)
    2347       || ((ol == o)
    2348          && (set[an].ecart > p.ecart))
    2349       || ((ol == o)
    2350          && (set[an].ecart == p.ecart)
    2351          //&& (set[length].lp+set[length].length > p.lp+p.length))
    2352          && (set[length].length > p.length))
    2353       || ((ol == o)
    2354          && (set[an].ecart == p.ecart)
    2355          //&& (set[length].lp+set[length].length == p.lp+p.length)
    2356          && (set[length].length == p.length)
    2357          && (pLmCmp(set[an].p,p.p) != -pOrdSgn)))
    2358         return en;
    2359       return an;
    2360     }
    2361     i=(an+en) / 2;
    2362     ol = pFDeg(set[i].p) + set[i].ecart;
    2363     if ((ol > o)
    2364     || ((ol == o)
    2365        && (set[i].ecart > p.ecart))
    2366     || ((ol == o)
    2367        && (set[i].ecart == p.ecart)
    2368        //&& (set[i].lp+set[i].length > p.lp+p.length))
    2369        && (set[i].length > p.length))
    2370     || ((ol == o)
    2371        && (set[i].ecart == p.ecart)
    2372        //&& (set[i].lp+set[i].length == p.lp+p.length)
    2373        && (set[i].length == p.length)
    2374        && (pLmCmp(set[i].p,p.p) != -pOrdSgn)))
    2375       an=i;
    2376     else
    2377       en=i;
    2378   }
    2379 }
    2380 #endif
    2381 /*2
    2382 * looks up the position of polynomial p in set
    2383 * e is the ecart of p
    2384 * set[length] is the smallest element in set with respect
    2385 * to the ordering-procedure pComp
    2386 */
    2387 int posInL17_c (const LSet set, const int length,
    2388                 const LObject &p,const kStrategy strat)
    2389 {
    2390   if (length<0) return 0;
    2391 
    2392   int cc = (-1+2*currRing->order[0]==ringorder_c);
    2393   /* cc==1 for (c,..), cc==-1 for (C,..) */
    2394   int c = pGetComp(p.p)*cc;
    2395   int o = pFDeg(p.p) + p.ecart;
    2396 
    2397   if (pGetComp(set[length].p)*cc > c)
    2398     return length+1;
    2399   if (pGetComp(set[length].p)*cc == c)
    2400   {
    2401     if ((pFDeg(set[length].p) + set[length].ecart > o)
    2402     || ((pFDeg(set[length].p) + set[length].ecart == o)
    2403        && (set[length].ecart > p.ecart))
    2404     || ((pFDeg(set[length].p) + set[length].ecart == o)
    2405        && (set[length].ecart == p.ecart)
    2406        && (pLmCmp(set[length].p,p.p) != -pOrdSgn)))
    2407       return length+1;
    2408   }
    2409   int i;
    2410   int an = 0;
    2411   int en= length;
    2412   loop
    2413   {
    2414     if (an >= en-1)
    2415     {
    24162357      if (pGetComp(set[an].p)*cc > c)
    24172358        return en;
    24182359      if (pGetComp(set[an].p)*cc == c)
    24192360      {
    2420         if ((pFDeg(set[an].p) + set[an].ecart > o)
    2421         || ((pFDeg(set[an].p) + set[an].ecart == o)
     2361        if ((set[an].GetpFDeg() + set[an].ecart > o)
     2362        || ((set[an].GetpFDeg() + set[an].ecart == o)
    24222363           && (set[an].ecart > p.ecart))
    2423         || ((pFDeg(set[an].p) + set[an].ecart == o)
     2364        || ((set[an].GetpFDeg() + set[an].ecart == o)
    24242365           && (set[an].ecart == p.ecart)
    24252366           && (pLmCmp(set[an].p,p.p) != -pOrdSgn)))
     
    24332374    else if (pGetComp(set[i].p)*cc == c)
    24342375    {
    2435       if ((pFDeg(set[i].p) + set[i].ecart > o)
    2436       || ((pFDeg(set[i].p) + set[i].ecart == o)
     2376      if ((set[i].GetpFDeg() + set[i].ecart > o)
     2377      || ((set[i].GetpFDeg() + set[i].ecart == o)
    24372378         && (set[i].ecart > p.ecart))
    2438       || ((pFDeg(set[i].p) +set[i].ecart == o)
     2379      || ((set[i].GetpFDeg() +set[i].ecart == o)
    24392380         && (set[i].ecart == p.ecart)
    24402381         && (pLmCmp(set[i].p,p.p) != -pOrdSgn)))
     
    27062647void initS (ideal F, ideal Q,kStrategy strat)
    27072648{
    2708   LObject h;
    27092649  int   i,pos;
    27102650
    2711   h.ecart=0; h.length=0;
    27122651  if (Q!=NULL) i=IDELEMS(Q);
    27132652  else i=0;
     
    27282667      if (Q->m[i]!=NULL)
    27292668      {
     2669        LObject h;
    27302670        h.p = pCopy(Q->m[i]);
    27312671        if (TEST_OPT_INTSTRATEGY)
     
    27622702    if (F->m[i]!=NULL)
    27632703    {
     2704      LObject h;
    27642705      h.p = pCopy(F->m[i]);
    2765         if (TEST_OPT_INTSTRATEGY)
    2766         {
    2767           //pContent(h.p);
    2768           pCleardenom(h.p); // also does a pContent
    2769         }
    2770         else
    2771         {
    2772           pNorm(h.p);
    2773         }
    2774         strat->initEcart(&h);
    2775         if (pOrdSgn==-1)
    2776         {
    2777           cancelunit(&h);  /*- tries to cancel a unit -*/
    2778           deleteHC(&h.p, &h.ecart, &h.length,strat);
    2779         }
    2780         if (TEST_OPT_DEGBOUND
    2781         && (((strat->honey) && (h.ecart+pFDeg(h.p)>Kstd1_deg))
    2782           || ((!(strat->honey)) && (pFDeg(h.p)>Kstd1_deg))))
    2783           pDelete(&h.p);
    2784         else
     2706      if (TEST_OPT_INTSTRATEGY)
     2707      {
     2708        //pContent(h.p);
     2709        pCleardenom(h.p); // also does a pContent
     2710      }
     2711      else
     2712      {
     2713        pNorm(h.p);
     2714      }
     2715      strat->initEcart(&h);
     2716      if (pOrdSgn==-1)
     2717      {
     2718        cancelunit(&h);  /*- tries to cancel a unit -*/
     2719        deleteHC(&h.p, &h.ecart, &h.length,strat);
     2720      }
     2721      if (TEST_OPT_DEGBOUND
     2722          && (((strat->honey) && (h.ecart+pFDeg(h.p)>Kstd1_deg))
     2723              || ((!(strat->honey)) && (pFDeg(h.p)>Kstd1_deg))))
     2724        pDelete(&h.p);
     2725      else
    27852726        if (h.p!=NULL)
    27862727        {
     
    28052746void initSL (ideal F, ideal Q,kStrategy strat)
    28062747{
    2807   LObject h;
    28082748  int   i,pos;
    28092749
     
    28262766      if (Q->m[i]!=NULL)
    28272767      {
     2768        LObject h;
    28282769        h.p = pCopy(Q->m[i]);
    28292770        if (TEST_OPT_INTSTRATEGY)
     
    28602801    if (F->m[i]!=NULL)
    28612802    {
     2803      LObject h;
    28622804      h.p = pCopy(F->m[i]);
    2863       h.p1=NULL;
    2864       h.p2=NULL;
    2865       h.lcm=NULL;
    2866         if (TEST_OPT_INTSTRATEGY)
    2867         {
    2868           //pContent(h.p);
    2869           pCleardenom(h.p); // also does a pContent
    2870         }
    2871         else
    2872         {
    2873           pNorm(h.p);
    2874         }
    2875         strat->initEcart(&h);
    2876         if (pOrdSgn==-1)
    2877         {
    2878           cancelunit(&h);  /*- tries to cancel a unit -*/
    2879           deleteHC(&h.p, &h.ecart, &h.length,strat);
    2880         }
    2881         if (TEST_OPT_DEGBOUND
    2882         && (((strat->honey) && (h.ecart+pFDeg(h.p)>Kstd1_deg))
    2883           || ((!(strat->honey)) && (pFDeg(h.p)>Kstd1_deg))))
    2884           pDelete(&h.p);
    2885         else
     2805      if (TEST_OPT_INTSTRATEGY)
     2806      {
     2807        //pContent(h.p);
     2808        pCleardenom(h.p); // also does a pContent
     2809      }
     2810      else
     2811      {
     2812        pNorm(h.p);
     2813      }
     2814      strat->initEcart(&h);
     2815      if (pOrdSgn==-1)
     2816      {
     2817        cancelunit(&h);  /*- tries to cancel a unit -*/
     2818        deleteHC(&h.p, &h.ecart, &h.length,strat);
     2819      }
     2820      if (TEST_OPT_DEGBOUND
     2821          && (((strat->honey) && (h.ecart+pFDeg(h.p)>Kstd1_deg))
     2822              || ((!(strat->honey)) && (pFDeg(h.p)>Kstd1_deg))))
     2823        pDelete(&h.p);
     2824      else
    28862825        if (h.p!=NULL)
    28872826        {
     
    29102849void initSSpecial (ideal F, ideal Q, ideal P,kStrategy strat)
    29112850{
    2912   LObject h;
    29132851  int   i,pos;
    29142852
    2915   h.ecart=0; h.length=0;
    29162853  if (Q!=NULL) i=IDELEMS(Q);
    29172854  else i=0;
     
    29332870      if (Q->m[i]!=NULL)
    29342871      {
     2872        LObject h;
    29352873        h.p = pCopy(Q->m[i]);
    29362874        //if (TEST_OPT_INTSTRATEGY)
     
    29692907    if (F->m[i]!=NULL)
    29702908    {
     2909      LObject h;
    29712910      h.p = pCopy(F->m[i]);
    29722911      if (pOrdSgn==1)
     
    30032942    if (P->m[i]!=NULL)
    30042943    {
     2944      LObject h;
    30052945      h.p=pCopy(P->m[i]);
    30062946      strat->initEcart(&h);
     
    34873427  }
    34883428  strat->T[atT] = (TObject) p;
    3489   if (strat->use_buckets && p.pLength <= 0)
    3490     strat->T[atT].pLength = pLength(p.p);
    34913429
    34923430  if (strat->tailRing != currRing && pNext(p.p) != NULL)
     
    34953433    strat->T[atT].max = NULL;
    34963434
     3435  strat->T[atT].FDeg = p.pFDeg();
    34973436  strat->tl++;
    34983437  strat->R[strat->tl] = &(strat->T[atT]);
    34993438  strat->T[atT].i_r = strat->tl;
     3439  assume(p.sev == 0 || pGetShortExpVector(p.p) == p.sev);
    35003440  strat->sevT[atT] = (p.sev == 0 ? pGetShortExpVector(p.p) : p.sev);
    35013441  kTest_T(&(strat->T[atT]));
     
    39323872  assume(strat->tailRing == currRing);
    39333873
    3934   // for the time being, let's not do anything for syzComp and minim
    3935   // if (strat->syzComp) return;
    3936  
    39373874  for (i=0; i<= strat->Ll; i++)
    39383875  {
     
    39473884  if (e <= 1) e = 2;
    39483885 
    3949  
    39503886  kStratChangeTailRing(strat, NULL, NULL, e);
    39513887}
  • Singular/kutil.h

    r84038f rdf8937  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: kutil.h,v 1.43 2000-11-14 16:04:57 obachman Exp $ */
     6/* $Id: kutil.h,v 1.44 2000-11-16 09:54:52 obachman Exp $ */
    77/*
    88* ABSTRACT: kernel: utils for kStd
     
    3939public:
    4040  poly p;       // Lm(p) \in currRing Tail(p) \in tailRing
    41   poly t_p;     // t_p \in tailRing
     41  poly t_p;     // t_p \in tailRing: as monomials Lm(t_p) == Lm(p)
    4242  ring tailRing;
    43   int ecart, length, pLength, i_r;
    44   poly max; // p_MaxExp(pNext(p))
    45  
     43  poly max;     // p_MaxExpP(pNext(p))
     44  long FDeg;    // pFDeg(p)
     45  int ecart,
     46    length,     // as of pLDeg
     47    pLength,    // either == 0, or == pLength(p)
     48    i_r;        // index of TObject in R set
     49  BOOLEAN is_normalized; // true, if pNoram was called on p, false otherwise
    4650
    4751  // initialization
     
    8185
    8286  // deg stuff
     87  // computes pFDeg
    8388  KINLINE long pFDeg() const;
     89  // computes and sets FDeg
     90  KINLINE long SetpFDeg();
     91  // gets stored FDeg
     92  KINLINE long GetpFDeg() const;
     93 
     94  // computes pLDeg
    8495  KINLINE long pLDeg();
    85   KINLINE long SetLengthEcartReturnLDeg();
     96  // sets length, FDeg, returns LDeg
     97  KINLINE long SetDegStuffReturnLDeg();
    8698 
    8799  // arithmetic
     
    97109  void wrp();
    98110#endif
    99  
    100111};
    101112
     
    129140  KINLINE poly GetP(omBin lmBin = NULL);
    130141  KINLINE void CanonicalizeP();
     142 
     143  KINLINE long pLDeg();
     144  KINLINE long SetLength();
     145  KINLINE long SetDegStuffReturnLDeg();
     146
     147  KINLINE long MinComp();
    131148
    132149  KINLINE void ShallowCopyDelete(ring new_tailRing, 
Note: See TracChangeset for help on using the changeset viewer.