Changeset c0632a4 in git for kernel/GBEngine/kutil.cc


Ignore:
Timestamp:
Jul 5, 2018, 9:02:32 PM (6 years ago)
Author:
Karim Abou Zeid <karim23697@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
3a961a3f6d0a9dd9edd07a18ca373384df3a221c
Parents:
216e128447d274610a03d71c71d03d4e7d330814
Message:
the tail of shifted polys in T is now the tail of the unshifted poly
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/kutil.cc

    r216e12 rc0632a4  
    566566        else
    567567        {
     568          if (currRing->isLPring && strat->T[j].shift > 0) {
     569            pNext(p) = NULL; // pNext(p) points to the unshifted tail, don't try to delete it here
     570          }
    568571          pDelete(&p);
    569572        }
     
    822825    if (T->p == NULL && i > 0)
    823826      return dReportError("%c[%d].p is NULL", TN, i);
    824     pFalseReturn(p_Test(T->p, currRing));
     827    if (currRing->isLPring && T->shift > 0) {
     828      // in this case, the order is not correct. test LM and tail separately
     829      pFalseReturn(p_LmTest(T->p, currRing));
     830      pFalseReturn(p_Test(pNext(T->p), currRing));
     831    } else {
     832      pFalseReturn(p_Test(T->p, currRing));
     833    }
    825834  }
    826835
     
    92779286  int i;
    92789287
    9279   pp_Test(p.p, currRing, p.tailRing);
     9288#ifdef PDEBUG
     9289  if (currRing->isLPring && p.shift > 0) {
     9290    // in this case, the order is not correct. test LM and tail separately
     9291    p_LmTest(p.p, currRing);
     9292    p_Test(pNext(p.p), currRing);
     9293  } else {
     9294    pp_Test(p.p, currRing, p.tailRing);
     9295  }
     9296#endif
    92809297  assume(strat->tailRing == p.tailRing);
    92819298  // redMoraNF complains about this -- but, we don't really
     
    93269343  }
    93279344
    9328   if ((strat->tailBin != NULL) && (pNext(p.p) != NULL))
     9345  // letterplace: if p.shift > 0 then pNext(p.p) is already in the tailBin
     9346  if ((strat->tailBin != NULL) && (pNext(p.p) != NULL) && !(currRing->isLPring && p.shift > 0))
    93299347  {
    93309348    pNext(p.p)=p_ShallowCopyDelete(pNext(p.p),
     
    1250112519#ifdef HAVE_SHIFTBBA
    1250212520/*2
    12503 * puts p to the set T, starting with the at position atT
    12504 * and inserts all admissible shifts of p
     12521* enteres all admissible shifts of p into T
     12522* assumes that p is already in T!
    1250512523*/
    1250612524void enterTShift(LObject p, kStrategy strat, int atT)
     
    1251412532  int toInsert = itoInsert(p.p, strat->tailRing);
    1251512533
    12516   poly shifted;
    1251712534  for (int i = 1; i <= toInsert; i++)
    1251812535  {
    12519     shifted = p_mLPshift(p_Head(p.p, currRing), i, currRing);
    12520     LObject qq(shifted);
    12521     qq.SetpFDeg();
    12522     qq.SetShortExpVector();
     12536    poly shifted = p_mLPshift(p_Head(p.p, currRing), i, currRing);
     12537    pNext(shifted) = pNext(p.p);
     12538    LObject qq;
     12539    qq.p = shifted; // don't use Set() because it'll test the poly order
    1252312540    qq.shift = i;
    12524     qq.pUnshifted = pNext(p.p);
    12525     strat->initEcart(&qq);
    12526     qq.ecart = p.ecart;
    12527     #ifdef KTEST
    12528     kTest_T(&qq, strat->tailRing, -1, 'L');
    12529     #endif
    12530     /* enter it into T, first el't is with the shift 0 */
    12531     enterT(qq, strat, atT);
     12541    strat->initEcart(&qq); // initEcartBBA sets length, pLength, FDeg and ecart
     12542
     12543    enterT(qq, strat, atT); // enterT is modified, so it doesn't copy and delete the tail of shifted polys
    1253212544  }
    1253312545}
Note: See TracChangeset for help on using the changeset viewer.