A toolkit for working with phylogenetic data.
v0.20.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sequence/functions/entropy.hpp File Reference
#include <cstddef>
#include <type_traits>
#include <string>

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::sequence
 

Enumerations

enum  SiteEntropyOptions : unsigned char { kDefault = 0, kIncludeGaps = 1, kWeighted = 2, kNormalized = 4 }
 Option flags to refine the calculation of site_entropy(). More...
 

Functions

double absolute_entropy (SiteCounts const &counts, SiteEntropyOptions per_site_options=SiteEntropyOptions::kDefault)
 Return the sum of all site entropies. More...
 
double averaged_entropy (SiteCounts const &counts, bool only_determined_sites=false, SiteEntropyOptions per_site_options=SiteEntropyOptions::kDefault)
 Return the averaged sum of all site entropies. More...
 
bool operator& (SiteEntropyOptions lhs, SiteEntropyOptions rhs)
 And-operator to check whether a SiteEntropyOptions is set. More...
 
SiteEntropyOptions operator| (SiteEntropyOptions lhs, SiteEntropyOptions rhs)
 Or-operator to combine two SiteEntropyOptionss. More...
 
SiteEntropyOptions & operator|= (SiteEntropyOptions &lhs, SiteEntropyOptions rhs)
 Or-assignment-operator to combine two SiteEntropyOptionss. More...
 
double site_entropy (SiteCounts const &counts, size_t site_index, SiteEntropyOptions options=SiteEntropyOptions::kDefault)
 Calculate the entropy at one site of a SiteCounts object. More...
 
double site_information (SiteCounts const &counts, size_t site_index, bool use_small_sample_correction=false, SiteEntropyOptions options=SiteEntropyOptions::kDefault)
 Calculate the information content at one site of a SiteCounts object. More...