示例#1
0
void ReducerHashPack<Q>::insertTail(NewConstTerm multiple, const Poly& poly) {
  MATHICGB_ASSERT(&poly.ring() == &mRing);
  if (poly.termCount() <= 1)
    return;
  auto entry = new (mPool.alloc()) MultipleWithPos(poly, multiple);
  ++entry->pos;
  insertEntry(entry);
}
示例#2
0
void ReducerPackDedup<Q>::insertTail(NewConstTerm multiple, const Poly& poly) {
  if (poly.termCount() <= 1)
    return;
  mLeadTermKnown = false;

  auto entry = new (mPool.alloc()) MultipleWithPos(poly, multiple);
  ++entry->pos;
  entry->computeCurrent(poly.ring());
  mQueue.push(entry);
}
示例#3
0
void ReducerNoDedup<Q>::insertTail(NewConstTerm multiple, const Poly& poly) {
  if (poly.termCount() <= 1)
    return;
  mLeadTermKnown = false;

  auto it = poly.begin();
  const auto end = poly.end();
  for (++it; it != end; ++it) {
    NewTerm t;
    t.mono = mRing.allocMonomial();
    mRing.monoid().multiply(*multiple.mono, it.mono(), *t.mono);
    mRing.coefficientMult(multiple.coef, it.coef(), t.coef);
    mQueue.push(t);
  }
}