Class child_iterator

Class Documentation

class fwdpp::ts::child_iterator

Faciliate traversal of a node’s children.

Public Functions

child_iterator(const marginal_tree &m, table_index_t n, bool left_to_right_traversal)

Parameters

table_index_t operator()()

Advance to the next child.

Returns fwdpp::ts::NULL_INDEX when no more children remain.

template<typename F>
bool operator()(const F &f)

Apply a function to each child

Returns false to signify end of iteration.

Parameters
  • f: A function equivalent to void (*process_child)(table_index_t)