A toolkit for working with phylogenetic data.
v0.24.0
tree/bipartition/functions.cpp File Reference

Go to the source code of this file.

Namespaces

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

Functions

std::vector< Bipartition > bipartition_set (Tree const &tree)
 
std::vector< size_t > find_monophyletic_subtree_edges (Tree const &tree, std::vector< Bipartition > const &bipartitions, std::vector< TreeNode const * > const &nodes, bool include_splitting_edges=true, bool include_leaf_edges=true)
 Find clades of the tree that are monophyletic with respect to the given list of nodes, that is, clades that only contain nodes from that list. Return all edge indices of those clades. More...
 
std::vector< size_t > find_monophyletic_subtree_edges (Tree const &tree, std::vector< TreeNode const *> const &nodes, bool include_splitting_edges, bool include_leaf_edges)
 
std::vector< size_t > find_monophyletic_subtree_edges (Tree const &tree, std::vector< std::string > const &node_names, bool include_splitting_edges, bool include_leaf_edges)
 
Bipartition find_smallest_subtree (Tree const &tree, std::vector< Bipartition > const &bipartitions, std::vector< TreeNode const * > const &nodes)
 Find the smallest subtree (measured in number of nodes) that contains all given nodes. More...
 
std::vector< size_t > get_clade_edges (Tree const &tree, std::vector< tree::TreeNode const * > const &nodes)
 
std::vector< size_t > get_clade_edges (Tree const &tree, std::vector< std::string > const &node_names)
 
std::vector< size_t > get_subtree_edges (TreeLink const &subtree)
 
utils::Bitvector leaf_node_bitvector (Tree const &tree, std::vector< TreeNode const * > leaf_nodes)
 Return a Bitvector that has as many entries as the tree has leaf nodes, and is true where the given leaf_nodes are. More...
 
std::vector< size_t > node_to_leaf_map (Tree const &tree)