272{
278 sum->insert_minimal(bmin);
280 {
285 else
286 {
287 sum->insert_minimal(
new Bag(0, a.monom()));
288 elems.push_back(b);
289 }
290 }
291
292
293 std::vector<std::pair<int, int>> degs_and_indices;
294 int count = 0;
295 for (auto& b : elems)
296 {
298 degs_and_indices.push_back(std::make_pair(deg, count));
299 ++count;
300 }
301 std::stable_sort(degs_and_indices.begin(), degs_and_indices.end());
302
303 for (
auto p : degs_and_indices)
304 {
305 Bag* b = elems[
p.second];
308 delete b;
309 else
311 }
312}
static void quotient(ConstExponents a, ConstExponents b, Vector &result)
static Exponent simple_degree(ConstExponents m)
static void copy(ConstExponents vp, Vector &result)
static bool divides(ConstExponents a, ConstExponents b)
int search(const_varpower m, Bag *&b) const
void insert_minimal(Bag *b)
const PolynomialRing * get_ring() const
Engine-side monomial ideal: a decision tree of Nmi_nodes storing the (typically minimal) generators b...
gc_vector< int > & monom()
const mpreal sum(const mpreal tab[], const unsigned long int n, int &status, mp_rnd_t mode=mpreal::get_default_rnd())
typename std::vector< T, gc_allocator< T > > gc_vector
a version of the STL vector, which allocates its backing memory with gc.