|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Classes | |
| struct | Dewey_Level |
| A level of the path that number_tree() follows: the length of the Dewey number of the parent, and the position of the node among its siblings. More... | |
| class | Df_Low_Builder |
| Depth-first traversal that builds the tree of build_df_low_tree(). More... | |
| struct | Tree_Deleter |
| Deleter that frees a whole tree. More... | |
Functions | |
| void | number_tree (Df_Low_Tree_Node *root, const DynList< Df_Low_Non_Tree_Arc > &arcs, DynMapTree< Df_Low_Tree_Node *, std::string > &numbers) |
Give to each node that an arc of arcs names its Dewey number, as generate_tree() writes them. | |
|
inline |
Give to each node that an arc of arcs names its Dewey number, as generate_tree() writes them.
The nodes go in preorder, as generate_tree() takes them, without recursion: a path can be as long as the tree is deep. Only the numbers that the arcs need are kept, each as long as its node is deep.
Definition at line 336 of file generate_df_tree.H.
References Aleph::and, arcs, Aleph::Tree_Node< T >::get_left_child(), Aleph::Tree_Node< T >::get_parent(), Aleph::Tree_Node< T >::get_right_sibling(), Aleph::df_tree_detail::Dewey_Level::index, Aleph::DynMapTree< Key, Data, Tree, Compare >::insert(), Aleph::Tree_Node< T >::is_rightmost(), Aleph::df_tree_detail::Dewey_Level::parent_length, Aleph::Dfs_Stack< T >::pop(), Aleph::Dfs_Stack< T >::push(), root(), Aleph::DynMapTree< Key, Data, Tree, Compare >::search(), Aleph::DynSetTree< Key, Tree, Compare >::size(), and Aleph::Dfs_Stack< T >::top().
Referenced by Aleph::write_df_low_tree().