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

◆ update_expvector()

template<typename Key>
void F4MonomialLookupTableT< Key >::update_expvector ( int topvar,
const_varpower_monomial m )
private

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

229{
230 int nvars = topvar + 1;
231 if (*m > 0 && m[1] >= nvars) nvars = static_cast<int>(m[1] + 1);
232 if (size_of_exp <= nvars)
233 {
234 // Increase size of exponent vector
235 delete [] exp0;
236 if (nvars > 2 * size_of_exp)
238 else
239 size_of_exp *= 2;
240
242 for (auto i=0; i<size_of_exp; ++i) exp0[i] = 0;
243 }
244
245 int nparts = static_cast<int>(*m++);
246 for (int i = nparts; i > 0; i--, m += 2)
247 {
248 exp0[*m] = m[1];
249 }
250}

References exp0, and size_of_exp.

Referenced by find_all_divisors_vp(), and find_one_divisor_vp().