Skip to content

st_tree examples

erikerlandson edited this page May 12, 2011 · 6 revisions

st_tree Home

x01_hello_world.cpp
Demonstrate: simple tree declaration, “raw” (vector) child node storage model, basic iterator

x02_ordered_children.cpp
Demonstrate: declaring and using “ordered” (multiset) child node storage model

x03_keyed_children.cpp
Demonstrate: declaring and using “keyed” (map) child node storage model

x04_sort_children.cpp
Demonstrate: random access node iterators with raw storage model, using std::sort() on child nodes

x05_node_methods.cpp
Demonstrate: Some basic node methods: ply(), depth(), is_root(), parent(), subtree_size()

x06_graft.cpp
Demonstrate: Node assignment, node insert() and node graft()

x07_iterators.cpp
Demonstrate: Tree traversal iterators, node child iterator, node subtree traversal iterators. Traversals for breadth-first, depth-first preorder and depth-first postorder are shown.

Clone this wiki locally