A library for working with phylogenetic and population genetic data.
phylo_factor.hpp File Reference
#include "genesis/tree/mass_tree/balances.hpp"
#include "genesis/utils/containers/matrix.hpp"
#include <functional>
#include <unordered_set>
#include <vector>

Go to the source code of this file.


struct  PhyloFactor
 A single phylogenetic factor. More...


 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...