Related to #1, there could be a function for calculating the Kuhner-Felsenstein distance between two trees, as described in Kuhner and Felsenstein, 94, Equation (1).
auto distance = 0.0;
for(auto bipartition : bipartition_map_a) {
auto other = find(bipartition_map_b, bipartition);
auto other_length = other ? other.edge_length : 0.0;
distance += pow(bipartition.edge_length - other_length, 2);
}
Maybe this could be written in such a way that the actual distance can be easily exchanged? As in, the body of the for sans the find could be passed as a functional.
Related to #1, there could be a function for calculating the Kuhner-Felsenstein distance between two trees, as described in Kuhner and Felsenstein, 94, Equation (1).
Maybe this could be written in such a way that the actual distance can be easily exchanged? As in, the body of the for sans the find could be passed as a functional.