Changeset ea5feb2 in git


Ignore:
Timestamp:
Oct 19, 2018, 8:41:16 AM (6 years ago)
Author:
Christian Eder
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
818f44cc2595a5708ca93b629ecbff680947d9ff
Parents:
ab6ae3e4daabcf18b48dab4c572a7e169b83bbd1
Message:
fixes check which and if an element from S needs to be replaced
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/kutil.cc

    rab6ae3 rea5feb2  
    94629462  assume(p.pLength == 0 || pLength(p.p) == p.pLength || rIsSyzIndexRing(currRing)); // modulo syzring
    94639463
    9464   int i, pos;
    9465 
    9466   pos = posInS(strat, strat->sl, p.p, p.ecart);
    9467 
    9468   pp_Test(p.p, currRing, p.tailRing);
    9469   assume(p.FDeg == p.pFDeg());
    9470 
     9464  int i, j, pos;
    94719465  poly tp = strat->T[tj].p;
    9472   /* remove useless pairs from L set */
    9473   for (i = 0; i <= strat->Ll; ++i) {
    9474     if (strat->L[i].p1 != NULL && pLtCmp(tp, strat->L[i].p1) == 0) {
    9475       deleteInL(strat->L, &(strat->Ll), i, strat);
    9476       i--;
    9477       continue;
    9478     }
    9479     if (strat->L[i].p2 != NULL && pLtCmp(tp, strat->L[i].p2) == 0) {
    9480       deleteInL(strat->L, &(strat->Ll), i, strat);
    9481       i--;
    9482     }
    9483   }
     9466
    94849467  /* enter p to T set */
    94859468  enterT(p, strat);
    9486   /* generate new pairs with p, probably removing older, now useless pairs */
    9487   superenterpairs(p.p, strat->sl, p.ecart, pos, strat, strat->tl);
    9488   /* enter p to S set */
    9489   strat->enterS(p, pos, strat, strat->tl);
     9469
     9470  for (j = 0; j <= strat->sl; ++j) {
     9471    if (pLtCmp(tp, strat->S[j]) == 0) {
     9472      break;
     9473    }
     9474  }
     9475  /* it may be that the exchanged element is only in T and not in S,
     9476         * then we only need to add the element to T (done above), but
     9477         * nothing else needs to be done */
     9478  if (j <= strat->sl) {
     9479    deleteInS(j, strat);
     9480
     9481    pos = posInS(strat, strat->sl, p.p, p.ecart);
     9482
     9483    pp_Test(p.p, currRing, p.tailRing);
     9484    assume(p.FDeg == p.pFDeg());
     9485
     9486    /* remove useless pairs from L set */
     9487    for (i = 0; i <= strat->Ll; ++i) {
     9488      if (strat->L[i].p1 != NULL && pLtCmp(tp, strat->L[i].p1) == 0) {
     9489        deleteInL(strat->L, &(strat->Ll), i, strat);
     9490        i--;
     9491        continue;
     9492      }
     9493      if (strat->L[i].p2 != NULL && pLtCmp(tp, strat->L[i].p2) == 0) {
     9494        deleteInL(strat->L, &(strat->Ll), i, strat);
     9495        i--;
     9496      }
     9497    }
     9498    /* generate new pairs with p, probably removing older, now useless pairs */
     9499    superenterpairs(p.p, strat->sl, p.ecart, pos, strat, strat->tl);
     9500    /* enter p to S set */
     9501    strat->enterS(p, pos, strat, strat->tl);
     9502  }
    94909503}
    94919504
Note: See TracChangeset for help on using the changeset viewer.