A toolkit for working with phylogenetic data.
v0.18.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
measures.cpp File Reference

Detailed Description

Implementation of PlacementMeasures class.

Definition in file measures.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::placement
 

Functions

double edpl (Sample const &sample, Pquery const &pquery)
 Shortcut alias for expected_distance_between_placement_locations(). More...
 
std::vector< double > edpl (Sample const &sample)
 Shortcut alias for expected_distance_between_placement_locations(). More...
 
double expected_distance_between_placement_locations (Pquery const &pquery, utils::Matrix< double > const &node_distances)
 Calculate the EDPL uncertainty values for a Pquery. More...
 
double expected_distance_between_placement_locations (Sample const &sample, Pquery const &pquery)
 Calculate the EDPL uncertainty values for a Pquery. More...
 
std::vector< double > expected_distance_between_placement_locations (Sample const &sample)
 Calculate the expected_distance_between_placement_locations() for all Pqueries in the Sample. More...
 
double pairwise_distance (const Sample &smp_a, const Sample &smp_b, bool with_pendant_length=false)
 Calculate the normalized pairwise distance between all placements of the two Samples. More...
 
double placement_distance (PqueryPlacement const &place_a, PqueryPlacement const &place_b, utils::Matrix< double > const &node_distances)
 
double pquery_distance (const PqueryPlain &pqry_a, const PqueryPlain &pqry_b, const utils::Matrix< double > &node_distances, bool with_pendant_length=false)
 Calculates the normalized distance between two plain pqueries. It is mainly a helper method for distance calculations (e.g., pairwise distance, variance). More...
 
double variance (const Sample &smp, bool with_pendant_length=false)
 Calculate the variance of the placements on a tree. More...
 
double variance_partial (const PqueryPlain &pqry_a, const std::vector< PqueryPlain > &pqrys_b, const utils::Matrix< double > &node_distances, bool with_pendant_length)
 Internal function that calculates the sum of distances contributed by one pquery for the variance. See variance() for more information. More...
 
void variance_thread (const int offset, const int incr, const std::vector< PqueryPlain > *pqrys, const utils::Matrix< double > *node_distances, double *partial, bool with_pendant_length)
 Internal function that calculates the sum of distances for the variance that is contributed by a subset of the pqueries. See variance() for more information. More...