1 #ifndef GENESIS_TREE_MASS_TREE_BALANCES_H_ 2 #define GENESIS_TREE_MASS_TREE_BALANCES_H_ 38 #include <unordered_set> 249 std::vector<MassTree>
const& trees,
277 std::unordered_set<size_t>
const& numerator_edge_indices,
278 std::unordered_set<size_t>
const& denominator_edge_indices
294 std::unordered_set<size_t>
const& numerator_edge_indices,
295 std::unordered_set<size_t>
const& denominator_edge_indices,
302 #endif // include guard Use the geometric mean of the taxon masses.
Use the Euclidean norm of the relative abundances of the taxon.
WeightTendency tendency
Set the term for asssing the central tendency of taxon masses for calculating the taxon weights...
WeightNorm norm
Set the term for the norm of relative abundances for calculating the taxon weights.
BalanceData mass_balance_data(std::vector< MassTree > const &trees, BalanceSettings settings)
Calculate the data needed to calculate balances on MassTrees.
utils::Matrix< double > raw_edge_masses
The absolute raw per-edge masses per original input Tree.
double pseudo_count_summand_zeros
Set the constant that is added to taxon masses that are zero, to avoid zero counts.
Data needed to calculate balances.
Container namespace for all symbols of genesis in order to keep them separate when used as a library...
Use no tendency, that is, use 1.0 for this term.
Tree MassTree
Alias for a Tree that stores masses on its TreeEdges.
Class for representing phylogenetic trees.
Settings to calculate balances and the Phylogenetic ILR Transform.
double pseudo_count_summand_all
Set the constant that is added to all taxon masses to avoid zero counts.
std::vector< double > mass_balance(BalanceData const &data, std::unordered_set< size_t > const &numerator_edge_indices, std::unordered_set< size_t > const &denominator_edge_indices)
Calculate the balance of edge masses between two sets of edges.
Use the arithmetic mean of the taxon masses.
Tree tree
The Tree on which to calculate balances.
std::vector< double > taxon_weights
The taxon/edge weights calculated from mulitple trees.
utils::Matrix< double > edge_masses
The relative per-edge masses per original input Tree.
Use the median of the taxon masses.