A library for working with phylogenetic and population genetic data.
phylo_factor.cpp File Reference

Go to the source code of this file.


 Container namespace for all symbols of genesis in order to keep them separate when used as a library.


PhyloFactor phylo_factor_find_best_edge (BalanceData const &data, std::unordered_set< size_t > const &candidate_edges, std::function< double(std::vector< double > const &balances)> objective)
 Helper function for phylogenetic_factorization() that tries all candidate edges to find the one that maximizes the objective function. More...
std::unordered_set< size_t > phylo_factor_subtree_indices (Subtree const &subtree, std::unordered_set< size_t > const &candidate_edges)
 Helper function for phylogenetic_factorization() to find the constrained subtrees that are split by an edge. More...
std::vector< PhyloFactor > phylogenetic_factorization (BalanceData const &data, std::function< double(std::vector< double > const &balances)> objective, size_t max_iterations=0, std::function< void(size_t iteration, size_t max_iterations)> log_progress={})
 Calculate the Phylogenetic Factorization (PhyloFactor) of a set of MassTrees. More...