Template Function fwdpp::ts::visit_sites

Function Documentation

template<typename TableCollectionType, typename F, typename SAMPLES>
void fwdpp::ts::visit_sites(const TableCollectionType &tables, SAMPLES &&samples, const F &f, const double from, const double to)

Apply a function to all sites in range [from, to)

The type of

f must be equavalent to:
Parameters
  • tables: A ts::table_collection

  • samples: A list of samples

  • f: A function. See below

  • from: Start of range (inclusive)

  • to: End of range (exclusive)

std::function<void(const ts::marginal_tree&, const ts::site&,
    typename TableCollectionType::mutation_table::const_iterator
    typename TableCollectionType::mutation_table::const_iterator)>

The last two iterators define the range of mutations in correpsonding to the ts::site object passed in. The range is defined following standard C++ conventions for bidirectional iterators from a vector.

Version

0.8.0 Added to library