42 #include <Bpp/Numeric/Prob/SimpleDiscreteDistribution.h> 56 map<size_t, size_t> counts;
57 for (
size_t i = 0; i < classes.size(); i++)
64 map<double, double> distribution;
65 for (map<size_t, size_t>::iterator i = counts.begin(); i != counts.end(); i++)
67 distribution[rDist->getCategory(i->first)] = (double)i->second / (
double)classes.size();
71 return new SimpleDiscreteDistribution(distribution);
virtual std::vector< size_t > getRateClassWithMaxPostProbOfEachSite() const =0
Get the posterior rate class (the one with maximum posterior probability) for each site...
Interface for rate across sites (RAS) implementation.
virtual const DiscreteDistribution * getRateDistribution() const =0
Get the rate distribution used for the computation.