A library for working with phylogenetic and population genetic data.
v0.32.0
tree/mass_tree/emd.cpp File Reference
#include "genesis/tree/mass_tree/emd.hpp"
#include "genesis/tree/function/operators.hpp"
#include "genesis/tree/iterator/postorder.hpp"
#include "genesis/tree/mass_tree/tree.hpp"
#include "genesis/tree/tree.hpp"
#include "genesis/utils/core/logging.hpp"
#include "genesis/utils/containers/matrix.hpp"
#include "genesis/utils/containers/matrix/operators.hpp"
#include <algorithm>
#include <cassert>
#include <cmath>
#include <stdexcept>
#include <utility>
#include <vector>

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

double earth_movers_distance (MassTree const &lhs, MassTree const &rhs, double p=1.0)
 Calculate the earth mover's distance of two distributions of masses on a given Tree. More...
 
std::pair< double, double > earth_movers_distance (MassTree const &tree, double p=1.0)
 Calculate the earth mover's distance of masses on a given Tree. More...
 
utils::Matrix< double > earth_movers_distance (std::vector< MassTree > const &trees, double p=1.0)
 Calculate the pairwise earth mover's distance for all MassTrees. More...