248{
249 assert(comp >= 1);
250 if (comp >= static_cast<int>(_head.size())) return -1;
253
254 int smallest_val = -1;
255 mpz_srcptr smallest = nullptr;
256
258
259 for (t = head->_next; t != head; t = t->_next)
260 if ((expmask & t->_mask) == 0)
261 {
262 bool is_div = 1;
263 for (
int i = 0; i <
_nvars; i++)
264 if (exp[i] < t->_lead[i])
265 {
266 is_div = 0;
267 break;
268 }
269 if (is_div)
270 {
271 if (smallest_val < 0 || (mpz_cmpabs(smallest, t->_coeff) > 0))
272 {
273 smallest_val = t->_val;
274 smallest = t->_coeff;
275 }
276 }
277 }
278 return smallest_val;
279}
static unsigned long monomial_mask(int nvars, exponents_t exp)
MonomialTable::mon_term plus an _coeff slot pointing at the entry's leading ZZ coefficient (or nullpt...