|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Lazy binary tree traversal with coroutines (tpl_binNodeGenerators.H). More...
#include <iostream>#include <vector>#include <print_rule.H>#include <tpl_binNode.H>#include <tpl_binNodeGenerators.H>#include <tpl_binNodeUtils.H>Go to the source code of this file.
Functions | |
| int | main () |
Lazy binary tree traversal with coroutines (tpl_binNodeGenerators.H).
for_each_in_order/for_each_preorder/for_each_postorder (tpl_binNodeUtils.H) visit a binary tree with a void-returning callback, so those helpers always consume the whole traversal. Aleph also has eager iterator-based helpers such as infix_traverse() and prefix_traverse() whose bool callback can stop early.
lazy_in_order/lazy_pre_order/lazy_post_order (tpl_binNodeGenerators.H) traverse the exact same way, but as an Aleph::Generator<Node *> driven by a range-for. A plain break stops the traversal immediately, with no callback contract, and the result can be composed with other Generator-based code.
Definition in file lazy_tree_traversal_example.cc.
| int main | ( | void | ) |
Definition at line 187 of file lazy_tree_traversal_example.cc.
References Aleph::blossom_maximum_cardinality_matching(), and root().