4 #ifndef __SEQUENCE_COALESCENT_TREE_OPERATIONS_HPP__ 5 #define __SEQUENCE_COALESCENT_TREE_OPERATIONS_HPP__ 13 double total_time(
const marginal::const_iterator beg,
18 const double & rtime);
29 const int & total_number_of_sites );
37 std::unique_ptr<sfs_times_impl> impl;
40 sfs_times(arg::const_iterator sample_history_beg,
41 const arg::size_type & nsegs,
42 const int & total_nsites_simulated,
44 sfs_times(
const sfs_times &);
47 double operator[]( std::vector<double>::size_type
const & )
const;
48 sfs_times & operator=(
const sfs_times &);
49 bool operator==(
const sfs_times & rhs)
const;
52 typedef std::vector<double>::const_iterator const_iterator;
53 const_iterator begin()
const;
54 const_iterator end()
const;
std::list< marginal > arg
Ancestral Recombination Graph.
int pick_branch(marginal::const_iterator beg, const int &nsam, const double &rtime)
pick a random branch of a marginal tree
void minimize_arg(arg *sample_history)
The namespace in which this library resides.
declaration of types for coalescent simulation
double total_time(const marginal::const_iterator beg, const int &nsam)
Calculate total time on a marginal tree.
double total_time_on_arg(const Sequence::coalsim::arg &sample_history, const int &total_number_of_sites)
Returns the total time on an ancestral recombination graph.
std::vector< int > get_all_descendants(marginal::const_iterator beg, const int &nsam, const int &branch)
Find all the descendants of a branch on a marginal tree.
bool is_descendant(marginal::const_iterator beg, const int &ind, const int &branch)
Ask if a tip of a tree is a descendant of a particular branch.