Histogram
Description
Histogram is basically an integer array, but it contains some useful methods and meta information, which makes it a perfect data structure to store information about frequencies of numeric values, e.g. frequency of image pixel values.
class Histogram : public Array< int > { private: float domainBegin; float domainEnd; float binSize; public: Histogram(); Histogram( float l, float r, float i); Histogram( float l, float r, float i, int bins); Histogram( float l, float r, float i, void* data, int count); int Size() const; void Reserve( int capacity ); int* Begin(); int* End(); const int* Begin() const; const int* End() const; float DomainBegin() const; float DomainEnd() const; float BinSize() const; void SetDomainBegin( float l ); void SetDomainEnd( float r ); void SetBinSize( float i ); };