Macaulay2 Engine
Loading...
Searching...
No Matches

◆ minimalize_varpower_monomials()

void minimalize_varpower_monomials ( const std::vector< varpower_monomial > & elems,
std::vector< int > & result_minimals )

Definition at line 520 of file f4-monlookup.cpp.

522{
523 std::vector<std::pair<int, int>> degs_and_indices;
524 int count = 0;
525 for (auto& b : elems)
526 {
528 degs_and_indices.push_back(std::make_pair(deg, count));
529 ++count;
530 }
531 std::stable_sort(degs_and_indices.begin(), degs_and_indices.end());
532
533 F4MonomialLookupTableT<int> M(10); // 10 is simply a suggested value
534 for (auto p : degs_and_indices)
535 {
536 int k; // unused: we only care if there is a divisor, not which index it has
537 if (!M.find_one_divisor_vp(0, elems[p.second], k))
538 {
539 M.insert_minimal_vp(0, elems[p.second], 0);
540 result_minimals.push_back(p.second);
541 }
542 }
543}
static Exponent simple_degree(ConstExponents m)
int p

References F4MonomialLookupTableT< Key >::find_one_divisor_vp(), F4MonomialLookupTableT< Key >::insert_minimal_vp(), p, and ExponentList< long, false >::simple_degree().