Changeset 6ad5ce in git


Ignore:
Timestamp:
Apr 4, 2008, 12:30:09 PM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
Children:
9b87a3e8e48687ab61432c83aa6566b20acb73f9
Parents:
d9665a0359ac0f90f1cdb71b7a7ad914f4fc3ec1
Message:
*hannes: buckets/normalize in redtailBba


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

Legend:

Unmodified
Added
Removed
  • kernel/kbuckets.cc

    rd9665a0 r6ad5ce  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kbuckets.cc,v 1.34 2008-01-30 09:01:36 wienand Exp $ */
     4/* $Id: kbuckets.cc,v 1.35 2008-04-04 10:30:09 Singular Exp $ */
    55
    66#include "mod2.h"
     
    429429  #endif
    430430  assume(pLength(p) == (int) pl);
     431  //if (TEST_OPT_PROT) { Print("C(%d)",pl); }
    431432  kbTest(bucket);
    432433  return i;
     
    441442    MULTIPLY_BUCKET(bucket,i);
    442443    //bucket->coef[i]=NULL;
    443 #endif
     444  #endif
    444445    *p = bucket->buckets[i];
    445446    *length = bucket->buckets_length[i];
  • kernel/kstd2.cc

    rd9665a0 r6ad5ce  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd2.cc,v 1.65 2008-03-13 19:25:48 levandov Exp $ */
     4/* $Id: kstd2.cc,v 1.66 2008-04-04 10:30:09 Singular Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: alg. of Buchberger
     
    13291329  strat->initEcart = initEcartBBA;
    13301330  strat->enterS = enterSBba;
     1331#ifndef NO_BUCKETS
     1332  strat->use_buckets = (!TEST_OPT_NOT_BUCKETS) && (!rIsPluralRing(currRing));
     1333#endif
    13311334  /*- set S -*/
    13321335  strat->sl = -1;
     
    13871390  /*- set S -*/
    13881391  strat->sl = -1;
     1392#ifndef NO_BUCKETS
     1393  strat->use_buckets = (!TEST_OPT_NOT_BUCKETS) && (!rIsPluralRing(currRing));
     1394#endif
    13891395  /*- init local data struct.---------------------------------------- -*/
    13901396  /*Shdl=*/initS(F,Q,strat);
  • kernel/kutil.cc

    rd9665a0 r6ad5ce  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kutil.cc,v 1.88 2008-03-13 19:25:48 levandov Exp $ */
     4/* $Id: kutil.cc,v 1.89 2008-04-04 10:30:09 Singular Exp $ */
    55/*
    66* ABSTRACT: kernel: utils for kStd
     
    319319      {
    320320        p_Delete(&pNext(p), r);
    321         if (!inNF)
    322         {
     321        if (!inNF)
     322        {
    323323          number eins=nInit(1);
    324324          if (L->p != NULL)  pSetCoeff(L->p,eins);
    325325          else if (L->t_p != NULL) nDelete(&pGetCoeff(L->t_p));
    326326          if (L->t_p != NULL) pSetCoeff0(L->t_p,eins);
    327         }
     327        }
    328328        L->ecart = 0;
    329329        L->length = 1;
     
    41784178poly redtailBba (LObject* L, int pos, kStrategy strat, BOOLEAN withT, BOOLEAN normalize)
    41794179{
     4180#define REDTAIL_CANONICALIZE 100
    41804181  strat->redTailChange=FALSE;
    41814182  if (strat->noTailReduction) return L->GetLmCurrRing();
     
    41984199  Ln.PrepareRed(strat->use_buckets);
    41994200
     4201  int cnt=REDTAIL_CANONICALIZE;
    42004202  while(!Ln.IsNull())
    42014203  {
     
    42154217        if (With == NULL) break;
    42164218      }
     4219      cnt--;
     4220      if (cnt==0)
     4221      {
     4222        cnt=REDTAIL_CANONICALIZE;
     4223        poly tmp=Ln.CanonicalizeP();
     4224        if (normalize)
     4225        {
     4226          Ln.Normalize();
     4227          //pNormalize(tmp);
     4228          //if (TEST_OPT_PROT) { PrintS("n"); mflush(); }
     4229        }
     4230      }
    42174231      if (normalize && (!TEST_OPT_INTSTRATEGY) && (!nIsOne(pGetCoeff(With->p))))
    42184232      {
    42194233        With->pNorm();
    4220         //if (TEST_OPT_PROT) { PrintS("n"); mflush(); }
    42214234      }
    42224235      strat->redTailChange=TRUE;
     
    42394252    pNext(h) = Ln.LmExtractAndIter();
    42404253    pIter(h);
     4254    pNormalize(h);
    42414255    L->pLength++;
    42424256  }
     
    42514265    L->length = 0;
    42524266  }
    4253   L->Normalize(); // HANNES: should have a test
     4267
     4268  //if (TEST_OPT_PROT) { PrintS("N"); mflush(); }
     4269  //L->Normalize(); // HANNES: should have a test
    42544270  kTest_L(L);
    42554271  return L->GetLmCurrRing();
     
    49024918            change=TRUE;
    49034919            any_change=TRUE;
    4904             #ifdef KDEBUG
     4920            #ifdef KDEBUG
    49054921            if (TEST_OPT_DEBUG)
    49064922            {
     
    49084924              wrp(redSi);PrintS(" to ");p_wrp(strat->S[i], currRing, strat->tailRing);PrintLn();
    49094925            }
    4910             #endif
     4926            #endif
    49114927            if (TEST_OPT_PROT)
    49124928            {
Note: See TracChangeset for help on using the changeset viewer.