示例#1
0
ReducerPack<Q>::MultipleWithPos::MultipleWithPos(
  const Poly& poly,
  NewConstTerm multipleParam
):
  pos(poly.begin()),
  end(poly.end()),
  current(poly.ring().allocMonomial())
{
  multiple.mono = poly.ring().monoid().alloc().release();
  poly.ring().monoid().copy(*multipleParam.mono, *multiple.mono);
  multiple.coef = multipleParam.coef;
}
示例#2
0
void ReducerHashPack<Q>::insert(ConstMonoRef multiple, const Poly& poly) {
  MATHICGB_ASSERT(&poly.ring() == &mRing);
  if (poly.isZero())
    return;
  NewConstTerm termMultiple = {1, multiple.ptr()};
  insertEntry(new (mPool.alloc()) MultipleWithPos(poly, termMultiple));
}
示例#3
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);
}
示例#4
0
void ReducerPackDedup<Q>::insert(ConstMonoRef multiple, const Poly& poly) {
  if (poly.isZero())
    return;
  mLeadTermKnown = false;

  NewConstTerm termMultiple = {1, multiple.ptr()};
  auto entry = new (mPool.alloc()) MultipleWithPos(poly, termMultiple);
  entry->computeCurrent(poly.ring());
  mQueue.push(entry);
}
示例#5
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);
}
示例#6
0
TournamentReducer::MultipleWithPos::MultipleWithPos
(const Poly& poly, const_term multiple):
  pos(poly.begin()),
  end(poly.end()),
  multiple(allocTerm(poly.ring(), multiple)),
  current(poly.ring().allocMonomial()) {}