diff --git a/vcg/math/histogram.h b/vcg/math/histogram.h index b8b29195..b27b3451 100644 --- a/vcg/math/histogram.h +++ b/vcg/math/histogram.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.16 2006/11/28 21:29:21 cignoni +Re added typedef Histogramf and Histogramd + Revision 1.15 2006/11/28 09:47:42 corsini add documentation fix typo @@ -152,6 +155,7 @@ public: */ void Add(ScalarType v); + int MaxCount() const; /** * Returns the value corresponding to a given percentile of the data. * @@ -263,6 +267,14 @@ void Histogram::FileWrite(const std::string &filename) } +template +int Histogram::MaxCount() const +{ + return *(std::max_element(H.begin(),H.end())); +} + + + template ScalarType Histogram::Percentile(ScalarType frac) const {