Changeset b2c236 in git for kernel/kstd2.cc


Ignore:
Timestamp:
Nov 27, 2006, 5:11:23 PM (17 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
9e9ec3df945106169f8daf8b55033fea8579fa1b
Parents:
9550253271625a21c0e4629145949aa74007ac56
Message:
*hannes: length in redHoney


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

Legend:

Unmodified
Added
Removed
  • kernel/kstd2.cc

    r955025 rb2c236  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd2.cc,v 1.26 2006-11-17 14:47:37 Singular Exp $ */
     4/* $Id: kstd2.cc,v 1.27 2006-11-27 16:09:46 Singular Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: alg. of Buchberger
     
    9393#else
    9494  int ende=strat->sl;
    95 #endif 
     95#endif
    9696  (*max_ind)=ende;
    9797  loop
     
    601601  d = reddeg = h->GetpFDeg() + h->ecart;
    602602  h->SetShortExpVector();
     603  int li;
    603604  h_p = h->GetLmTailRing();
    604605  not_sev = ~ h->sev;
     
    609610
    610611    ei = strat->T[j].ecart;
     612    li = strat->T[j].pLength;
    611613    ii = j;
    612614    /*
     
    621623      if (i > strat->tl)
    622624        break;
    623       if (ei <= h->ecart)
     625      if (ei < h->ecart)
    624626        break;
    625       if ((strat->T[i].ecart < ei) &&
     627      if (li==1)
     628        break;
     629      if (((strat->T[i].ecart < ei)
     630         || ((strat->T[i].ecart <= h->ecart) && (strat->T[i].pLength < li)))
     631         &&
    626632          p_LmShortDivisibleBy(strat->T[i].GetLmTailRing(), strat->sevT[i],
    627633                               h_p, not_sev, strat->tailRing))
     
    631637         */
    632638        ei = strat->T[i].ecart;
     639        li = strat->T[i].pLength;
    633640        ii = i;
    634641      }
     
    672679    assume(strat->fromT == FALSE);
    673680
     681#if 0 // test poly exchange
     682    if (strat->inStdFac==0)
     683    {
     684      int ll;
     685      poly t_p;
     686      if (strat->tailRing==currRing)
     687        t_p=strat->T[ii].p;
     688      else
     689        t_p=strat->T[ii].t_p;
     690      if ((p_LmCmp(h_p,t_p,strat->tailRing)==0)
     691      && ((ll=h->GuessLength()) < strat->T[ii].pLength))
     692      {
     693        h->GetP();
     694        if ((h->pLength=h->GetpLength()) < strat->T[ii].pLength)
     695        {
     696          if (TEST_OPT_PROT)  PrintS("e");
     697          h->GetP();
     698          if (h->p!=NULL)
     699          {
     700            if (strat->T[ii].p!=NULL)
     701            {
     702              poly swap;
     703              omTypeAlloc0Bin(poly,swap,currRing->PolyBin);
     704              memcpy(swap,h->p,currRing->PolyBin->sizeW*sizeof(long));
     705              memcpy(h->p,strat->T[ii].p,currRing->PolyBin->sizeW*sizeof(long));
     706              memcpy(strat->T[ii].p,swap,currRing->PolyBin->sizeW*sizeof(long));
     707              omFreeBinAddr(swap);
     708            }
     709            else
     710            {
     711              strat->T[ii].p=h->p;
     712              h->p=NULL;
     713            }
     714          }
     715          else
     716          {
     717            if (strat->T[ii].p!=NULL)
     718            {
     719              h->p=strat->T[ii].p;
     720              strat->T[ii].p=NULL;
     721            }
     722            // else: all NULL
     723          }
     724          if (h->t_p!=NULL)
     725          {
     726            if (strat->T[ii].t_p!=NULL)
     727            {
     728              poly swap;
     729              omTypeAlloc0Bin(poly,swap,strat->tailRing->PolyBin);
     730              memcpy(swap,h->t_p,strat->tailRing->PolyBin->sizeW*sizeof(long));
     731              memcpy(h->t_p,strat->T[ii].t_p,strat->tailRing->PolyBin->sizeW*sizeof(long));
     732              memcpy(strat->T[ii].t_p,swap,strat->tailRing->PolyBin->sizeW*sizeof(long));
     733              omFreeBinAddr(swap);
     734            }
     735            else
     736            {
     737              strat->T[ii].t_p=h->t_p;
     738              h->t_p=NULL;
     739            }
     740          }
     741          else
     742          {
     743            if (strat->T[ii].t_p!=NULL)
     744            {
     745              h->t_p=strat->T[ii].t_p;
     746              strat->T[ii].t_p=NULL;
     747            }
     748            // else: all NULL
     749          }
     750          if (strat->tailRing != currRing && (strat->T[ii].p != NULL)
     751          && pNext(strat->T[ii].p) != NULL)
     752             strat->T[ii].max =p_GetMaxExpP(pNext(strat->T[ii].p), strat->tailRing);
     753          else
     754             strat->T[ii].max = NULL;
     755          h->pLength=0;h->pLength=h->GetpLength();
     756          strat->T[ii].pLength=0;strat->T[ii].pLength=strat->T[ii].GetpLength();
     757          if (strat->T[ii].is_normalized)
     758          {
     759            strat->T[ii].is_normalized=0;
     760            strat->T[ii].pNorm();
     761          }
     762          else
     763          {
     764            if (TEST_OPT_INTSTRATEGY)
     765              strat->T[ii].pCleardenom();
     766          }
     767          h->PrepareRed(strat->use_buckets);
     768        }
     769      }
     770    }
     771#endif // test poly exchange
    674772    ksReducePoly(h, &(strat->T[ii]), NULL, NULL, strat);
    675773
     
    9231021    }
    9241022
    925 #ifdef HAVE_RING2TOM
    9261023    if (strat->P.p == NULL && strat->P.t_p == NULL)
    9271024    {
     
    9291026    }
    9301027    else
    931 #endif
    9321028    {
    9331029      if (TEST_OPT_PROT)
     
    10091105      strat->enterS(strat->P, pos, strat, strat->tl);
    10101106#endif
     1107      int pl=pLength(strat->P.p);
     1108      if (pl==1)
     1109      {
     1110        //if (TEST_OPT_PROT)
     1111        //PrintS("<1>");
     1112      }
     1113      else if (pl==2)
     1114      {
     1115        //if (TEST_OPT_PROT)
     1116        //PrintS("<2>");
     1117      }
    10111118      if (hilb!=NULL) khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
    10121119//      Print("[%d]",hilbeledeg);
Note: See TracChangeset for help on using the changeset viewer.