Class samples_iterator

Class Documentation

class fwdpp::ts::samples_iterator

Faciliate traversal of the samples descending from a node.

Public Functions

samples_iterator(const marginal_tree &m, table_index_t u, convert_sample_index_to_nodes convert)

Parameters

table_index_t operator()()

Advance to the next sample

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

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

Apply a function to each sample

Returns false to signify end of iteration.

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