Class node_iterator¶
Defined in File nodes.hpp
Class Documentation¶
-
class
fwdpp::ts::node_iterator¶ Traverse nodes in a marginal_tree.
Public Functions
-
template<typename
ORDER>node_iterator(const marginal_tree &m, ORDER order_policy)¶ Traverse nodes starting from all roots
The dispatch tag is sent to the appropriate overload of
fwdpp::ts::node_traversal_dispatch, which must return a std::unique_ptr containing an object derived from node_traversal_order.- Parameters
m: A marginal_treeorder_policy: A dispatch tag.
-
template<typename
ORDER>node_iterator(const marginal_tree &m, table_index_t u, ORDER order_policy)¶ Traverse nodes in a subtree whose root is u
The dispatch tag is sent to the appropriate overload of
fwdpp::ts::node_traversal_dispatch, which must return a std::unique_ptr containing an object derived from node_traversal_order.- Parameters
m: A marginal_treeu: A node in morder_policy: A dispatch tag.
-
table_index_t
operator()()¶ Return the next node in the tree. A value ot NULL_INDEX signals end of iteration.
-
template<typename
F>
table_index_toperator()(const F &f)¶ Apply a function to each node.
- Parameters
f: A function behaving as void(*process_node)(table_index_t) Returns false to signal end of iteration.
-
template<typename