Darwin  1.10(beta)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Attributes | List of all members
drwnHistogram< TYPE > Class Template Reference

Implements a simple templated histogram class. More...

Public Member Functions

 drwnHistogram (int n, double minVal, double maxVal)
 drwnHistogram (const drwnHistogram &h)
 copy constructor
 ~drwnHistogram ()
void addSample (TYPE s)
void addWeightedSample (TYPE s, double w)
void appendToFile (FILE *fp) const
double chiSquared (const drwnHistogram &H) const
 compute and return the chi-squared distance between the two histograms d(x,y) = sum( (xi-yi)^2 / (xi+yi) ) / 2; If the xi+yi yields a bin with zero count, then I disregard this bin...
void clear ()
int computeBin (const TYPE &s) const
double entropy () const
void convertInternalToCDF ()
double euclidean (const drwnHistogram &H) const
double getBinCenter (int b) const
double getBinLeft (int b) const
double getBinRight (int b) const
double getBinMass (int i) const
double getBinWeight (int i) const
double getBinWeightMax () const
double getBinWeightMax (int &binIndex) const
double getBinWeightSum () const
double getLikelihood (const TYPE &d) const
double getMass () const
double getMax () const
double getMin () const
int getNumberOfBins () const
double intersect (const drwnHistogram &H) const
double klDistance (const drwnHistogram &H) const
 compute the symmetric kl Difference (averaging the two assymetric)
double klDivergence (const drwnHistogram &H) const
 compute the one-way kldivergence from this to H
double l1distance (const drwnHistogram &H) const
void mergeHistogram (const drwnHistogram &H)
void mergeWeightedHistogram (const drwnHistogram &H, double w)
 only works for the case that the initial histogram here is 0 mass More...
void setAndNormalize (const drwnHistogram *H)

Protected Attributes

double _mass
int _numBins
TYPE * _bins
TYPE _min
TYPE _max
TYPE _alpha
TYPE _beta

Detailed Description

template<typename TYPE>
class drwnHistogram< TYPE >

Implements a simple templated histogram class.

Member Function Documentation

template<typename TYPE >
void drwnHistogram< TYPE >::mergeWeightedHistogram ( const drwnHistogram< TYPE > &  H,
double  w 

only works for the case that the initial histogram here is 0 mass

needs to be extended

The documentation for this class was generated from the following file: