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

◆ do_node()

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

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

403{
404 buffer o;
405 int i;
406 assert(p->left != NULL);
407 assert(p->right != NULL);
408 assert(p->left->right == p);
409 assert(p->right->left == p);
410 if (disp)
411 {
412 for (i = 1; i <= indent; i++) o << ' ';
413 o << p->var << ' ' << p->exp;
414 }
415 if (p->tag == mi_node::leaf)
416 {
417 nleaves++;
418 if (disp) o << ' ' << p->key();
419 }
420 else if (p == p->header)
421 nlists++;
422 else
423 nnodes++;
424 emit_line(o.str());
425}
void emit_line(const char *s)
Definition text-io.cpp:47

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

Referenced by do_tree().