372{
374
376 positions.reserve(exps.size());
377 for (unsigned int i = 0; i < exps.size(); i++) positions.push_back(i);
378
379
380
381
382 std::stable_sort(
383 positions.begin(), positions.end(), sorter(nvars, exps, comps));
384
386
387 VECTOR(
int)::iterator first,
end, last_minimal;
388 first = positions.begin();
389 end = positions.end();
390 last_minimal = first;
392 {
393 VECTOR(
int)::iterator next = first + 1;
395 int comp = comps[*first];
397 {
399 if (comp != comps[*next]) break;
400 rejects.push_back(*next);
401 next++;
402 }
403 if (
T->find_divisor(this_exp, comp) == -1)
404 {
405
406
407 T->insert(this_exp, comp, vals[*first]);
408 *last_minimal++ = *first;
409 }
410 else
411 rejects.push_back(*first);
412
413 first = next;
414
415 }
417}
exponents::Exponents exponents_t
static MonomialTable * make(int nvars)
static bool exponents_equal(int nvars, exponents_t a, exponents_t b)
TermIterator< Nterm > end(Nterm *)