Changeset 8d679fd in git


Ignore:
Timestamp:
Dec 3, 2009, 3:56:44 PM (14 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
7a4a438c344423ba7293bff2ab899900189f2830
Parents:
725ef18d92b06980ce6d68815819fcbf02497748
Message:
format, redRing

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

Legend:

Unmodified
Added
Removed
  • kernel/kstd2.cc

    r725ef18 r8d679fd  
    1212
    1313// define to enable tailRings
    14 #define HAVE_TAIL_RING
     14//#define HAVE_TAIL_RING
    1515
    1616#include "mod2.h"
     
    2222#endif /* ifndef NDEBUG */
    2323
    24 #if MYTEST 
     24#if MYTEST
    2525# ifdef HAVE_TAIL_RING
    2626#  undef HAVE_TAIL_RING
     
    301301int redRing (LObject* h,kStrategy strat)
    302302{
    303   if (h->p == NULL && h->t_p == NULL) return 0; // spoly is zero (can only occure with zero divisors)
    304 
    305 //  if (strat->tl<0) return 1;
     303  if (h->IsNull()) return 0; // spoly is zero (can only occure with zero divisors)
     304  if (strat->tl<0) return 1;
     305
    306306  int at,i;
    307307  long d;
     
    318318  loop
    319319  {
    320       j = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, h);
    321       if (j < 0) return 1;
    322 #ifdef KDEBUG
    323       if (TEST_OPT_DEBUG)
    324       {
    325         PrintS("T red:");
    326       }
    327 #endif
     320    j = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, h);
     321    if (j < 0) return 1;
    328322#ifdef KDEBUG
    329323    if (TEST_OPT_DEBUG)
    330324    {
     325      PrintS("T red:");
    331326      h->wrp();
    332327      PrintS(" with ");
     
    352347      h->lcm=NULL;
    353348#endif
     349      h->Clear();
    354350      return 0;
    355351    }
     
    362358    {
    363359      h->SetLmCurrRing();
     360      if (strat->posInLDependsOnLength)
     361        h->SetLength(strat->length_pLength);
    364362      at = strat->posInL(strat->L,strat->Ll,h,strat);
    365363      if (at <= strat->Ll)
     
    373371      }
    374372    }
    375     else if (d != reddeg)
     373    if (d != reddeg)
    376374    {
    377375      if (d >= strat->tailRing->bitmask)
    378376      {
    379         if (h->pTotalDeg() >= strat->tailRing->bitmask)
    380         {
    381           strat->overflow=TRUE;
     377        if (h->pTotalDeg() >= strat->tailRing->bitmask)
     378        {
     379          strat->overflow=TRUE;
    382380          //Print("OVERFLOW in redRing d=%ld, max=%ld\n",d,strat->tailRing->bitmask);
    383           h->GetP();
    384           at = strat->posInL(strat->L,strat->Ll,h,strat);
    385           enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at);
    386           h->Clear();
     381          h->GetP();
     382          at = strat->posInL(strat->L,strat->Ll,h,strat);
     383          enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at);
     384          h->Clear();
    387385          return -1;
    388386        }
     
    653651      if (d>=strat->tailRing->bitmask)
    654652      {
    655         if (h->pTotalDeg() >= strat->tailRing->bitmask)
    656         {
    657           strat->overflow=TRUE;
     653        if (h->pTotalDeg() >= strat->tailRing->bitmask)
     654        {
     655          strat->overflow=TRUE;
    658656          //Print("OVERFLOW in redLazy d=%ld, max=%ld\n",d,strat->tailRing->bitmask);
    659           h->GetP();
    660           at = strat->posInL(strat->L,strat->Ll,h,strat);
    661           enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at);
    662           h->Clear();
     657          h->GetP();
     658          at = strat->posInL(strat->L,strat->Ll,h,strat);
     659          enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at);
     660          h->Clear();
    663661          return -1;
    664662        }
     
    831829      if (d>=strat->tailRing->bitmask)
    832830      {
    833         if (h->pTotalDeg()+h->ecart >= strat->tailRing->bitmask)
    834         {
    835           strat->overflow=TRUE;
     831        if (h->pTotalDeg()+h->ecart >= strat->tailRing->bitmask)
     832        {
     833          strat->overflow=TRUE;
    836834          //Print("OVERFLOW in redHoney d=%ld, max=%ld\n",d,strat->tailRing->bitmask);
    837           h->GetP();
    838           at = strat->posInL(strat->L,strat->Ll,h,strat);
    839           enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at);
    840           h->Clear();
     835          h->GetP();
     836          at = strat->posInL(strat->L,strat->Ll,h,strat);
     837          enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at);
     838          h->Clear();
    841839          return -1;
    842840        }
     
    10031001#if MYTEST
    10041002  if (TEST_OPT_DEBUG)
    1005   { 
     1003  {
    10061004    PrintS("bba start GB: currRing: ");
    10071005    // rWrite(currRing);PrintLn();
     
    10301028
    10311029
     1030#ifdef KDEBUG
     1031  //kDebugPrint(strat);
     1032#endif
    10321033  /* compute------------------------------------------------------- */
    10331034  while (strat->Ll >= 0)
     
    10821083        if (!kStratChangeTailRing(strat))
    10831084        {
    1084           WerrorS("OVERFLOW..."); 
     1085          WerrorS("OVERFLOW...");
    10851086          break;
    10861087        }
Note: See TracChangeset for help on using the changeset viewer.