Changeset a642361 in git


Ignore:
Timestamp:
Oct 14, 2011, 1:46:29 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
5e600bf8be6b726a72f343024cd7f273e718f71a
Parents:
5f9b47ed5a8e9e527497f05d9afe96ec3e076cbf
Message:
better debug messages

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

Legend:

Unmodified
Added
Removed
  • kernel/kInline.cc

    r5f9b47 ra642361  
    4040  {
    4141    int sri= S_2_R[i];
    42     if (sri >= 0 && sri <= tl)
     42    if ((sri >= 0) && (sri <= tl))
    4343    {
    4444      TObject* t = R[sri];
    45       if (t != NULL && t->p == S[i])
     45      if ((t != NULL) && (t->p == S[i]))
    4646        return t;
    4747    }
  • kernel/kstd1.cc

    r5f9b47 ra642361  
    24192419      if (pos<strat->sl)
    24202420      {
    2421         need_retry++;
     2421        need_retry++;
    24222422        // move all "larger" elements fromS to L
    24232423        // remove them from T
     
    24272427          LObject h;
    24282428          memset(&h,0,sizeof(h));
    2429           h.tailRing=strat->tailRing;
     2429          h.tailRing=strat->tailRing;
    24302430          h.p=strat->S[ii]; strat->S[ii]=NULL;
    24312431          strat->initEcart(&h);
     
    24512451          int lpos=strat->posInL(strat->L,strat->Ll,&h,strat);
    24522452          enterL(&strat->L,&strat->Ll,&strat->Lmax,h,lpos);
     2453          #ifdef KDEBUG
     2454          if (TEST_OPT_DEBUG)
     2455          {
     2456            Print("move S[%d] -> L[%d]: ",ii,pos);
     2457            p_wrp(h.p,currRing, strat->tailRing);
     2458            PrintLn();
     2459          }
     2460          #endif
     2461        }
     2462        if (strat->fromQ!=NULL)
     2463        {
     2464          for(ii=pos+1;ii<=strat->sl;ii++) strat->fromQ[ii]=0;
    24532465        }
    24542466        strat->sl=pos;
     
    24572469
    24582470#ifdef KDEBUG
     2471    messageSets(strat);
    24592472    memset(&(strat->P), 0, sizeof(strat->P));
    24602473#endif
     
    24662479  /* complete reduction of the standard basis--------- */
    24672480
    2468   if((need_retry==0) && (TEST_OPT_REDSB))
     2481  if((need_retry<=0) && (TEST_OPT_REDSB))
    24692482  {
    24702483    completeReduce(strat);
     
    25282541  while (need_retry && (counter>0))
    25292542  {
     2543    #ifdef KDEBUG
     2544    if (TEST_OPT_DEBUG) { Print("retry counter %d\n",counter); }
     2545    #endif
    25302546    ideal res1=kInterRedBba(res,Q,need_retry);
    25312547    int new_elems=idElem(res1);
  • kernel/kutil.cc

    r5f9b47 ra642361  
    54015401            if (TEST_OPT_INTSTRATEGY)
    54025402            {
    5403               if (TEST_OPT_CONTENTSB)
    5404                 {
    5405                   number n;
    5406                   p_Cleardenom_n(strat->S[i], currRing, n);// also does a pContent
    5407                   if (!nIsOne(n))
    5408                     {
    5409                       denominator_list denom=(denominator_list)omAlloc(sizeof(denominator_list_s));
    5410                       denom->n=nInvers(n);
    5411                       denom->next=DENOMINATOR_LIST;
    5412                       DENOMINATOR_LIST=denom;
    5413                     }
    5414                   nDelete(&n);
    5415                 }
    5416               else
    5417                 {
    5418                   //pContent(strat->S[i]);
    5419                   strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent
    5420                 }
     5403              if (TEST_OPT_CONTENTSB)
     5404                {
     5405                  number n;
     5406                  p_Cleardenom_n(strat->S[i], currRing, n);// also does a pContent
     5407                  if (!nIsOne(n))
     5408                    {
     5409                      denominator_list denom=(denominator_list)omAlloc(sizeof(denominator_list_s));
     5410                      denom->n=nInvers(n);
     5411                      denom->next=DENOMINATOR_LIST;
     5412                      DENOMINATOR_LIST=denom;
     5413                    }
     5414                  nDelete(&n);
     5415                }
     5416              else
     5417                {
     5418                  //pContent(strat->S[i]);
     5419                  strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent
     5420                }
    54215421            }
    54225422            else
     
    54885488            if (TEST_OPT_INTSTRATEGY)
    54895489            {
    5490               if (TEST_OPT_CONTENTSB)
    5491                 {
    5492                   number n;
    5493                   p_Cleardenom_n(strat->S[i], currRing, n);// also does a pContent
    5494                   if (!nIsOne(n))
    5495                     {
    5496                       denominator_list denom=(denominator_list)omAlloc(sizeof(denominator_list_s));
    5497                       denom->n=nInvers(n);
    5498                       denom->next=DENOMINATOR_LIST;
    5499                       DENOMINATOR_LIST=denom;
    5500                     }
    5501                   nDelete(&n);
    5502                 }
    5503               else
    5504                 {
    5505                   //pContent(strat->S[i]);
    5506                   strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent
    5507                 }
     5490              if (TEST_OPT_CONTENTSB)
     5491                {
     5492                  number n;
     5493                  p_Cleardenom_n(strat->S[i], currRing, n);// also does a pContent
     5494                  if (!nIsOne(n))
     5495                    {
     5496                      denominator_list denom=(denominator_list)omAlloc(sizeof(denominator_list_s));
     5497                      denom->n=nInvers(n);
     5498                      denom->next=DENOMINATOR_LIST;
     5499                      DENOMINATOR_LIST=denom;
     5500                    }
     5501                  nDelete(&n);
     5502                }
     5503              else
     5504                {
     5505                  //pContent(strat->S[i]);
     5506                  strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent
     5507                }
    55085508            }
    55095509            else
     
    61286128    if (strat->ak==0) end_pos=i-1;
    61296129    TObject* T_j = strat->s_2_t(i);
    6130     if (T_j != NULL)
     6130    if ((T_j != NULL)&&(T_j->p==strat->S[i]))
    61316131    {
    61326132      L = *T_j;
     6133      #ifdef KDEBUG
     6134      if (TEST_OPT_DEBUG)
     6135      {
     6136        Print("test S[%d]:",i);
     6137        p_wrp(L.p,currRing,strat->tailRing);
     6138        PrintLn();
     6139      }
     6140      #endif
    61336141      poly p;
    61346142      if (pOrdSgn == 1)
     
    61366144      else
    61376145        strat->S[i] = redtail(&L, strat->sl, strat);
     6146      #ifdef KDEBUG
     6147      if (TEST_OPT_DEBUG)
     6148      {
     6149        Print("to (tailR) S[%d]:",i);
     6150        p_wrp(strat->S[i],currRing,strat->tailRing);
     6151        PrintLn();
     6152      }
     6153      #endif
    61386154
    61396155      if (strat->redTailChange && strat->tailRing != currRing)
     
    61516167    {
    61526168      assume(currRing == strat->tailRing);
     6169      #ifdef KDEBUG
     6170      if (TEST_OPT_DEBUG)
     6171      {
     6172        Print("test S[%d]:",i);
     6173        p_wrp(strat->S[i],currRing,strat->tailRing);
     6174        PrintLn();
     6175      }
     6176      #endif
    61536177      if (pOrdSgn == 1)
    61546178        strat->S[i] = redtailBba(strat->S[i], end_pos, strat, withT);
     
    61566180        strat->S[i] = redtail(strat->S[i], strat->sl, strat);
    61576181      if (TEST_OPT_INTSTRATEGY)
    6158         {
    6159           if (TEST_OPT_CONTENTSB)
    6160             {
    6161               number n;
    6162               p_Cleardenom_n(strat->S[i], currRing, n);// also does a pContent
    6163               if (!nIsOne(n))
    6164                 {
    6165                   denominator_list denom=(denominator_list)omAlloc(sizeof(denominator_list_s));
    6166                   denom->n=nInvers(n);
    6167                   denom->next=DENOMINATOR_LIST;
    6168                   DENOMINATOR_LIST=denom;
    6169                 }
    6170               nDelete(&n);
    6171             }
    6172           else
    6173             {
    6174               //pContent(strat->S[i]);
    6175               strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent
    6176             }
    6177         }
     6182      {
     6183        if (TEST_OPT_CONTENTSB)
     6184        {
     6185          number n;
     6186          p_Cleardenom_n(strat->S[i], currRing, n);// also does a pContent
     6187          if (!nIsOne(n))
     6188          {
     6189            denominator_list denom=(denominator_list)omAlloc(sizeof(denominator_list_s));
     6190            denom->n=nInvers(n);
     6191            denom->next=DENOMINATOR_LIST;
     6192            DENOMINATOR_LIST=denom;
     6193          }
     6194          nDelete(&n);
     6195        }
     6196        else
     6197        {
     6198          //pContent(strat->S[i]);
     6199          strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent
     6200        }
     6201      }
     6202      #ifdef KDEBUG
     6203      if (TEST_OPT_DEBUG)
     6204      {
     6205        Print("to (-tailR) S[%d]:",i);
     6206        p_wrp(strat->S[i],currRing,strat->tailRing);
     6207        PrintLn();
     6208      }
     6209      #endif
    61786210    }
    61796211    if (TEST_OPT_PROT)
Note: See TracChangeset for help on using the changeset viewer.