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

◆ do_node()

template<typename Key>
void F4MonomialLookupTableT< Key >::do_node ( mi_node * p,
int indent,
int disp ) const
private

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

389{
390 buffer o;
391 int i;
392 assert(p->left != nullptr);
393 assert(p->right != nullptr);
394 assert(p->left->right == p);
395 assert(p->right->left == p);
396 if (disp)
397 {
398 for (i = 1; i <= indent; i++) o << ' ';
399 o << p->var << ' ' << p->exp;
400 }
401 if (p->tag == mi_node::leaf)
402 {
403 nleaves++;
404 if (disp) o << ' ' << p->key();
405 }
406 else if (p == p->header)
407 nlists++;
408 else
409 nnodes++;
410 emit_line(o.str());
411}
void emit_line(const char *s)
Definition text-io.cpp:47

References emit_line(), F4MonomialLookupTableT< Key >::mi_node::leaf, nleaves, nlists, nnodes, p, and buffer::str().

Referenced by do_tree().