|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_TAXONOMY_FUNCTIONS_ENTROPY_H_
2 #define GENESIS_TAXONOMY_FUNCTIONS_ENTROPY_H_
174 size_t target_taxonomy_size,
191 size_t min_subtaxonomy_size
199 Taxonomy
const& taxonomy,
242 #endif // include guard
size_t max_subtaxonomy_size
Maximal size of a sub-taxonomy of the pruned Taxonomy. Default is 0.
size_t min_subtaxonomy_size
Minimal size of a sub-taxonomy of the pruned Taxonomy. Default is 0.
size_t count_taxa_with_prune_status(Taxonomy const &taxonomy, EntropyTaxonData::PruneStatus status)
Return the number of Taxa that have a certain prune status.
void expand_small_subtaxonomies(Taxonomy &taxonomy, size_t min_subtaxonomy_size)
Expand the leaves of a pruned Taxonomy if their sub-taxonomies are smaller than the given threshold.
Store settings for the Taxonomy pruning algorithm prune_by_entropy().
void prune_by_entropy(Taxonomy &taxonomy, size_t target_taxonomy_size, PruneByEntropySettings settings)
Prune a Taxonomy so that the result (approximately) contains a desired number of "leaf" Taxa,...
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
void remove_pruned_taxonomy_children(Taxonomy &taxonomy)
Remove the children of all Taxa that are pruned, i.e, that have prune status == kOutside.
Store a Taxonomy, i.e., a nested hierarchy of Taxa.
bool validate_pruned_taxonomy(Taxonomy const &taxonomy)
Validate that the pruning status of a Taxonomy is valid.
std::string print_pruned_taxonomy(Taxonomy const &taxonomy)
Print a Taxonomy, highlighting those Taxa that are the pruning border, i.e., where we cut off the sub...
size_t min_border_level
Minimum level of the Taxa that are considered inside for pruning. Default is 0.
bool allow_approximation
Allow some approximation in order to get closer to the target pruning size.