Changeset 802336 in git


Ignore:
Timestamp:
Jul 7, 2015, 2:38:28 PM (8 years ago)
Author:
Adi Popescu <adi_popescum@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
f32df145228a0829ff9b0de419b7da256166126e
Parents:
5ce55117cb44e8329794e5d1774b323ef206c8c5
Message:
fix: kFindDivisibleByInS,
updated: kPosInLDependsOnLength
add: debug ouput in enterpairs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/kutil.cc

    r5ce551 r802336  
    33503350          for (i=strat->Bl; i>=0; i--)
    33513351          {
    3352             if (pDivisibleBy(strat->S[j],strat->B[i].lcm))
     3352            if (pDivisibleBy(strat->S[j],strat->B[i].lcm) && n_DivBy(strat->B[i].lcm->coef, strat->S[j]->coef,currRing))
    33533353            {
    33543354#ifdef KDEBUG
     
    41244124  assume (!rField_is_Ring(currRing));
    41254125#endif
     4126  #if ADIDEBUG
     4127        Print("\n    Vor initenterpairs: The new pair list L -- after superenterpairs in loop\n");
     4128        for(int iii=0;iii<=strat->Ll;iii++)
     4129        {
     4130          printf("\n    L[%d]:\n",iii);
     4131          PrintS("         ");p_Write(strat->L[iii].p,strat->tailRing);
     4132          PrintS("         ");p_Write(strat->L[iii].p1,strat->tailRing);
     4133          PrintS("         ");p_Write(strat->L[iii].p2,strat->tailRing);
     4134        }
     4135        #endif
    41264136
    41274137  initenterpairs(h,k,ecart,0,strat, atR);
     4138
     4139      #if ADIDEBUG
     4140        Print("\n    Nach initenterpairs: The new pair list L -- after superenterpairs in loop \n");
     4141        for(int iii=0;iii<=strat->Ll;iii++)
     4142        {
     4143          printf("\n    L[%d]:\n",iii);
     4144          PrintS("         ");p_Write(strat->L[iii].p,strat->tailRing);
     4145          PrintS("         ");p_Write(strat->L[iii].p1,strat->tailRing);
     4146          PrintS("         ");p_Write(strat->L[iii].p2,strat->tailRing);
     4147        }
     4148        #endif
     4149
    41284150  if ( (!strat->fromT)
    41294151  && ((strat->syzComp==0)
     
    59816003      if (j > pos) return NULL;
    59826004#if defined(PDEBUG) || defined(PDIV_DEBUG)
    5983       if (p_LmShortDivisibleBy(strat->S[j], sev[j], p, not_sev, r) &&
     6005      if (strat->S[j]!= NULL && p_LmShortDivisibleBy(strat->S[j], sev[j], p, not_sev, r) &&
    59846006          (ecart== LONG_MAX || ecart>= strat->ecartS[j]))
    5985         break;
     6007        {
     6008#ifdef HAVE_RINGS
     6009            if(rField_is_Ring(r))
     6010                {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), r))
     6011                     break;}
     6012            else
     6013#endif
     6014            break;
     6015        }
    59866016#else
    59876017      if (!(sev[j] & not_sev) &&
    59886018          (ecart== LONG_MAX || ecart>= strat->ecartS[j]) &&
    59896019          p_LmDivisibleBy(strat->S[j], p, r))
    5990         break;
     6020        {
     6021#ifdef HAVE_RINGS
     6022            if(rField_is_Ring(r))
     6023                {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), r))
     6024                    break;}
     6025            else
     6026#endif
     6027            break;
     6028        }
    59916029
    59926030#endif
     
    60196057      if (p_LmShortDivisibleBy(t->t_p, sev[j], p, not_sev, r) &&
    60206058          (ecart== LONG_MAX || ecart>= strat->ecartS[j]))
    6021         return t;
     6059        {
     6060#ifdef HAVE_RINGS
     6061            if(rField_is_Ring(r))
     6062                {if(n_DivBy(pGetCoeff(p), pGetCoeff(t->t_p), r))
     6063                    return t;}
     6064            else
     6065#endif
     6066            return t;
     6067        }
    60226068#else
    60236069      if (! (sev[j] & not_sev) && (ecart== LONG_MAX || ecart>= strat->ecartS[j]))
     
    60256071        t = strat->S_2_T(j);
    60266072        assume(t != NULL && t->t_p != NULL && t->tailRing == r && t->p == strat->S[j]);
    6027         if (p_LmDivisibleBy(t->t_p, p, r)) return t;
     6073        if (p_LmDivisibleBy(t->t_p, p, r))
     6074        {
     6075#ifdef HAVE_RINGS
     6076            if(rField_is_Ring(r))
     6077                {if(n_DivBy(pGetCoeff(p), pGetCoeff(t->t_p), r))
     6078                    return t;}
     6079            else
     6080#endif
     6081            return t;
     6082        }
    60286083      }
    60296084#endif
     
    81768231{
    81778232  if (pos_in_l == posInL110 ||
    8178       pos_in_l == posInL10)
     8233      pos_in_l == posInL10  ||
     8234      pos_in_l == posInLRing)
    81798235    return TRUE;
    81808236
     
    83418397  }
    83428398  strat->fromT = FALSE;
     8399  strat->noTailReduction = !TEST_OPT_REDTAIL;
    83438400  if ((!TEST_OPT_SB_1)
    83448401  #ifdef HAVE_RINGS
     
    84568513  if (rField_is_Ring(currRing))
    84578514  {
    8458     strat->posInL = posInL11;
     8515    strat->posInL = posInL11Ring;
    84598516    strat->posInT = posInT11;
    84608517  }
     
    85418598    updateS(TRUE,strat);
    85428599  }
    8543   if (strat->fromQ!=NULL) omFreeSize(strat->fromQ,IDELEMS(strat->Shdl)*sizeof(int));
    8544   strat->fromQ=NULL;
     8600  //if (strat->fromQ!=NULL) omFreeSize(strat->fromQ,IDELEMS(strat->Shdl)*sizeof(int));
     8601  //strat->fromQ=NULL;
     8602  assume(kTest_TS(strat));
    85458603}
    85468604
Note: See TracChangeset for help on using the changeset viewer.