tree/function/distances.hpp File Reference

Header of Tree distance methods.

Definition in file tree/function/distances.hpp.

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 *, size_t > > | closest_leaf_depth_vector (Tree const &tree) |

Returns a vector containing the closest leaf node for each node, measured in number of edges between them and its depth (number of edges between them). More... | |

utils::Matrix< size_t > | edge_path_length_matrix (Tree const &tree) |

std::vector< size_t > | edge_path_length_vector (Tree const &tree, TreeEdge const &edge) |

utils::Matrix< size_t > | node_path_length_matrix (Tree const &tree) |

Return a matrix containing the pairwise depth of all nodes of the tree. More... | |

std::vector< size_t > | node_path_length_vector (Tree const &tree) |

Return a vector containing the depth of all nodes with respect to the root node. More... | |

std::vector< size_t > | node_path_length_vector (Tree const &tree, TreeNode const &node) |

Return a vector containing the depth of all nodes with respect to the given start node. More... | |