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

◆ find_all_divisors1()

template<typename Key>
void F4MonomialLookupTableT< Key >::find_all_divisors1 ( mi_node * mi,
const_ntuple_monomial exp,
std::vector< Key > & result_k ) const
private

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

197{
198 mi_node *p = mi;
199
200 for (;;)
201 {
202 p = p->right;
203
204 if (p == p->header)
205 {
206 if ((p = p->down()) == nullptr) return;
207 continue;
208 }
209
210 if (p->exp > exp[p->var])
211 {
212 if ((p = p->header->down()) == nullptr) return;
213 continue;
214 }
215
216 if (p->tag == mi_node::leaf)
217 {
218 result_k.push_back(p->key());
219 }
220 else
221 p = p->down();
222 }
223}

References F4MonomialLookupTableT< Key >::mi_node::leaf, and p.

Referenced by find_all_divisors_packed(), and find_all_divisors_vp().