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

◆ find_one_divisor1()

template<typename Key>
bool ResF4MonomialLookupTableT< Key >::find_one_divisor1 ( mi_node * mi,
const_ntuple_monomial exp,
Key & result_k ) const
private

Definition at line 170 of file res-f4-monlookup.cpp.

175{
176 if (mi == nullptr) return false;
177
178 mi_node *p = mi;
179
180 for (;;)
181 {
182 p = p->right;
183
184 if (p == p->header)
185 {
186 if ((p = p->down()) == nullptr) return false;
187 continue;
188 }
189
190 if (p->exp > exp[p->var])
191 {
192 if ((p = p->header->down()) == nullptr) return false;
193 continue;
194 }
195
196 if (p->tag == mi_node::leaf)
197 {
198 result_k = p->key();
199 return true;
200 }
201
202 p = p->down();
203 }
204}

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

Referenced by find_one_divisor_packed(), and find_one_divisor_vp().