Changeset 889de3e in git


Ignore:
Timestamp:
Nov 29, 2006, 7:09:45 PM (17 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '91fdef05f09f54b8d58d92a472e9c4a43aa4656f')
Children:
9539e8af1a7d0840365c263c55c25018387e104c
Parents:
d257ae16f04da87471103e162ffbf37e5a882860
Message:
*hannes: updateS simplified


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

Legend:

Unmodified
Added
Removed
  • kernel/kutil.cc

    rd257ae r889de3e  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kutil.cc,v 1.36 2006-11-17 14:48:40 Singular Exp $ */
     4/* $Id: kutil.cc,v 1.37 2006-11-29 18:09:45 Singular Exp $ */
    55/*
    66* ABSTRACT: kernel: utils for kStd
     
    47484748  int i, suc=0;
    47494749  poly redSi=NULL;
     4750  BOOLEAN change;
    47504751//  Print("nach initS: updateS start mit sl=%d\n",(strat->sl));
    47514752//  for (i=0; i<=(strat->sl); i++)
     
    47634764      while (i<=strat->sl)
    47644765      {
     4766        change=FALSE;
    47654767        if (((strat->syzComp==0) || (pGetComp(strat->S[i])<=strat->syzComp))
    47664768        && ((strat->fromQ==NULL) || (strat->fromQ[i]==0)))
    47674769        {
    4768           pDelete(&redSi);
    47694770          redSi = pHead(strat->S[i]);
    47704771          strat->S[i] = redBba(strat->S[i],i-1,strat);
    47714772          if ((strat->ak!=0)&&(strat->S[i]!=NULL))
    47724773            strat->S[i]=redQ(strat->S[i],i+1,strat); /*reduce S[i] mod Q*/
    4773           if (TEST_OPT_DEBUG && (pCmp(redSi,strat->S[i])!=0))
    4774           {
    4775             PrintS("reduce:");
    4776             wrp(redSi);PrintS(" to ");p_wrp(strat->S[i], currRing, strat->tailRing);PrintLn();
    4777           }
    4778           if (TEST_OPT_PROT && (pCmp(redSi,strat->S[i])!=0))
    4779           {
    4780             if (strat->S[i]==NULL)
    4781               PrintS("V");
    4782             else
    4783               PrintS("v");
    4784             mflush();
    4785           }
     4774          if (pCmp(redSi,strat->S[i])!=0)
     4775          {
     4776            change=TRUE;
     4777            if (TEST_OPT_DEBUG)
     4778            {
     4779              PrintS("reduce:");
     4780              wrp(redSi);PrintS(" to ");p_wrp(strat->S[i], currRing, strat->tailRing);PrintLn();
     4781            }
     4782            if (TEST_OPT_PROT)
     4783            {
     4784              if (strat->S[i]==NULL)
     4785                PrintS("V");
     4786              else
     4787                PrintS("v");
     4788              mflush();
     4789            }
     4790          }
     4791          pDeleteLm(&redSi);
    47864792          if (strat->S[i]==NULL)
    47874793          {
    4788             pDelete(&redSi);
    47894794            deleteInS(i,strat);
    47904795            i--;
    47914796          }
    4792           else
     4797          else if (change)
    47934798          {
    4794             pDelete(&redSi);
    47954799            if (TEST_OPT_INTSTRATEGY)
    47964800            {
     
    48474851      while (i<=strat->sl)
    48484852      {
     4853        change=FALSE;
    48494854        if (((strat->syzComp==0) || (pGetComp(strat->S[i])<=strat->syzComp))
    48504855        && ((strat->fromQ==NULL) || (strat->fromQ[i]==0)))
    48514856        {
    4852           pDelete(&redSi);
    48534857          redSi=pHead((strat->S)[i]);
    48544858          (strat->S)[i] = redMora((strat->S)[i],i-1,strat);
     
    48584862            i--;
    48594863          }
    4860           else
     4864          else if (pCmp((strat->S)[i],redSi)!=0)
    48614865          {
    48624866            if (TEST_OPT_INTSTRATEGY)
    48634867            {
    4864               pDelete(&redSi);
    48654868              pCleardenom(strat->S[i]);// also does a pContent
    48664869              h.p = strat->S[i];
     
    48704873            else
    48714874            {
    4872               pDelete(&redSi);
    48734875              pNorm(strat->S[i]);
    48744876              h.p = strat->S[i];
     
    48794881            strat->sevS[i] = h.sev;
    48804882          }
     4883          pDeleteLm(&redSi);
    48814884          kTest(strat);
    48824885        }
     
    49244927    if (suc!= -1) updateS(toT,strat);
    49254928  }
    4926   if (redSi!=NULL) pDeleteLm(&redSi);
    49274929#ifdef KDEBUG
    49284930  kTest(strat);
Note: See TracChangeset for help on using the changeset viewer.