void inorder_traversal(TLDNode *inorder[], long *curIndex, long size, TLDNode *node) { if (hasLeft(node)) { inorder_traversal(inorder, curIndex, size, node->left); } inorder[*curIndex] = node; (*curIndex)++; if (hasRight(node)) { inorder_traversal(inorder, curIndex, size, node->right); } }
void left() { assert( hasLeft() ); node_ = node_->getLeft(); }
const Node* getLeft() const { assert( hasLeft() ); return this + 1; }
int isLeaf(Tas * t, int i) { return !hasLeft(t, i); }