A library for working with phylogenetic and population genetic data.
v0.27.0
tree/common_tree/distances.cpp File Reference

Detailed Description

Implementation of CommonTree distance methods.

Definition in file tree/common_tree/distances.cpp.

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< std::pair< TreeNode const *, double > > closest_leaf_distance_vector (Tree const &tree)
 Return a vector containing the closest leaf node for each node, using the branch_length as distance measure. More...
 
std::vector< std::pair< TreeNode const *, double > > closest_leaf_distance_vector (Tree const &tree, utils::Matrix< double > const &node_distances)
 
double deepest_distance (Tree const &tree)
 Return the longest distance from any point in the tree (on the edges) to any leaf. More...
 
utils::Matrix< double > edge_branch_length_distance_matrix (Tree const &tree)
 
std::vector< double > edge_branch_length_distance_vector (Tree const &tree, TreeEdge const *edge)
 
std::vector< std::pair< TreeNode const *, double > > furthest_leaf_distance_vector (Tree const &tree)
 Opposite of closest_leaf_distance_vector(). More...
 
std::vector< std::pair< TreeNode const *, double > > furthest_leaf_distance_vector (Tree const &tree, utils::Matrix< double > const &node_distances)
 
template<class Comparator >
std::vector< std::pair< TreeNode const *, double > > leaf_distance_vector (Tree const &tree, utils::Matrix< double > const &node_distances, Comparator comp)
 Local helper function to calculate either closest_leaf_distance_vector() or furthest_leaf_distance_vector(). More...
 
utils::Matrix< double > node_branch_length_distance_matrix (Tree const &tree)
 Return a distance matrix containing pairwise distances between all Nodes, using the branch_length of the Edges as distance measurement. More...
 
std::vector< double > node_branch_length_distance_vector (Tree const &tree, TreeNode const *node=nullptr)
 Return a vector containing the distance of all nodes with respect to the given start node, where distance is measured in the sum of branch lengths between the nodes. More...