Representation of a histogram. More...
#include <OpenMS/MATH/STATISTICS/Histogram.h>
| Public Types | |
| typedef std::vector< ValueType > ::const_iterator | ConstIterator | 
| Non-mutable iterator of the bins.  More... | |
| Public Member Functions | |
| BinSizeType | minBound () const | 
| returns the lower bound  More... | |
| BinSizeType | maxBound () const | 
| returns the upper bound  More... | |
| ValueType | maxValue () const | 
| returns the highest value of all bins  More... | |
| ValueType | minValue () const | 
| returns the lowest value of all bins  More... | |
| BinSizeType | binSize () const | 
| returns the bin size  More... | |
| Size | size () const | 
| returns the number of bins  More... | |
| ValueType | operator[] (Size index) const | 
| returns the value of bin indexMore... | |
| BinSizeType | centerOfBin (Size bin_index) const | 
| returns the center position of the bin with the index bin_indexMore... | |
| ValueType | binValue (BinSizeType val) const | 
| returns the value of bin corresponding to the value valMore... | |
| Size | inc (BinSizeType val, ValueType increment=1) | 
| increases the bin corresponding to value valbyincrementMore... | |
| void | reset (BinSizeType min, BinSizeType max, BinSizeType bin_size) | 
| resets the histogram with the given range and bin size  More... | |
| void | applyLogTransformation (BinSizeType multiplier) | 
| Transforms the bin values with f(x)=multiplier*log(x+1)  More... | |
| Constructors and Destructors | |
| Histogram () | |
| default constructor  More... | |
| Histogram (const Histogram &histogram) | |
| copy constructor  More... | |
| Histogram (BinSizeType min, BinSizeType max, BinSizeType bin_size) | |
| constructor with min, max and bin size  More... | |
| virtual | ~Histogram () | 
| destructor  More... | |
| Assignment and equality operators | |
| bool | operator== (const Histogram &histogram) const | 
| Equality operator.  More... | |
| bool | operator!= (const Histogram &histogram) const | 
| Inequality operator.  More... | |
| Histogram & | operator= (const Histogram &histogram) | 
| Assignment.  More... | |
| Iterators | |
| ConstIterator | begin () const | 
| Non-mutable iterator pointing to the first bin.  More... | |
| ConstIterator | end () const | 
| Non-mutable iterator pointing after the last bin.  More... | |
| Protected Member Functions | |
| Size | valToBin_ (BinSizeType val) const | 
| Returns the bin a given value belongs to.  More... | |
| Protected Attributes | |
| BinSizeType | min_ | 
| Lower bound.  More... | |
| BinSizeType | max_ | 
| Upper bound.  More... | |
| BinSizeType | bin_size_ | 
| Bin size.  More... | |
| std::vector< ValueType > | bins_ | 
| Vector of bins.  More... | |
Representation of a histogram.
The first template argument gives the Type of the values that are stored in the bins. The second argument gives the type for the bin size and range.
| typedef std::vector<ValueType>::const_iterator ConstIterator | 
Non-mutable iterator of the bins.
| 
 | inline | 
default constructor
| 
 | inline | 
constructor with min, max and bin size
| Exception::OutOfRange | is thrown if bin_sizenegative or zero | 
References Histogram< ValueType, BinSizeType >::bin_size_, Histogram< ValueType, BinSizeType >::bins_, Histogram< ValueType, BinSizeType >::max_, and Histogram< ValueType, BinSizeType >::min_.
| 
 | inlinevirtual | 
destructor
| 
 | inline | 
Transforms the bin values with f(x)=multiplier*log(x+1)
References Histogram< ValueType, BinSizeType >::bins_.
| 
 | inline | 
Non-mutable iterator pointing to the first bin.
| 
 | inline | 
returns the bin size
References Histogram< ValueType, BinSizeType >::bin_size_.
| 
 | inline | 
returns the value of bin corresponding to the value val 
| Exception::OutOfRange | is thrown if the value is out of valid range | 
References Histogram< ValueType, BinSizeType >::bins_, and Histogram< ValueType, BinSizeType >::valToBin_().
| 
 | inline | 
returns the center position of the bin with the index bin_index 
| Exception::IndexOverflow | is thrown for invalid indices | 
References Histogram< ValueType, BinSizeType >::bin_size_, Histogram< ValueType, BinSizeType >::bins_, and Histogram< ValueType, BinSizeType >::min_.
| 
 | inline | 
Non-mutable iterator pointing after the last bin.
References Histogram< ValueType, BinSizeType >::bins_.
| 
 | inline | 
increases the bin corresponding to value val by increment 
| Exception::OutOfRange | is thrown if the value is out of valid range | 
References Histogram< ValueType, BinSizeType >::bins_, and Histogram< ValueType, BinSizeType >::valToBin_().
| 
 | inline | 
returns the upper bound
References Histogram< ValueType, BinSizeType >::max_.
| 
 | inline | 
returns the highest value of all bins
References Histogram< ValueType, BinSizeType >::bins_.
| 
 | inline | 
returns the lower bound
References Histogram< ValueType, BinSizeType >::min_.
| 
 | inline | 
returns the lowest value of all bins
References Histogram< ValueType, BinSizeType >::bins_.
| 
 | inline | 
Inequality operator.
References Histogram< ValueType, BinSizeType >::operator==().
| 
 | inline | 
Equality operator.
Referenced by Histogram< ValueType, BinSizeType >::operator!=().
| 
 | inline | 
returns the value of bin index 
| Exception::IndexOverflow | is thrown for invalid indices | 
References Histogram< ValueType, BinSizeType >::bins_.
| 
 | inline | 
resets the histogram with the given range and bin size
| Exception::OutOfRange | is thrown if bin_sizenegative or zero | 
References Histogram< ValueType, BinSizeType >::bin_size_, Histogram< ValueType, BinSizeType >::bins_, Histogram< ValueType, BinSizeType >::max_, and Histogram< ValueType, BinSizeType >::min_.
| 
 | inline | 
returns the number of bins
References Histogram< ValueType, BinSizeType >::bins_.
| 
 | inlineprotected | 
Returns the bin a given value belongs to.
| Exception::OutOfRange | is thrown if the value is out of valid range | 
References Histogram< ValueType, BinSizeType >::bins_, Histogram< ValueType, BinSizeType >::max_, and Histogram< ValueType, BinSizeType >::min_.
Referenced by Histogram< ValueType, BinSizeType >::binValue(), and Histogram< ValueType, BinSizeType >::inc().
| 
 | protected | 
| 
 | protected | 
Vector of bins.
Referenced by Histogram< ValueType, BinSizeType >::applyLogTransformation(), Histogram< ValueType, BinSizeType >::binValue(), Histogram< ValueType, BinSizeType >::centerOfBin(), Histogram< ValueType, BinSizeType >::end(), Histogram< ValueType, BinSizeType >::Histogram(), Histogram< ValueType, BinSizeType >::inc(), Histogram< ValueType, BinSizeType >::maxValue(), Histogram< ValueType, BinSizeType >::minValue(), Histogram< ValueType, BinSizeType >::operator=(), Histogram< ValueType, BinSizeType >::operator[](), Histogram< ValueType, BinSizeType >::reset(), Histogram< ValueType, BinSizeType >::size(), and Histogram< ValueType, BinSizeType >::valToBin_().
| 
 | protected | 
| 
 | protected | 
Lower bound.
Referenced by Histogram< ValueType, BinSizeType >::centerOfBin(), Histogram< ValueType, BinSizeType >::Histogram(), Histogram< ValueType, BinSizeType >::minBound(), Histogram< ValueType, BinSizeType >::operator=(), Histogram< ValueType, BinSizeType >::reset(), and Histogram< ValueType, BinSizeType >::valToBin_().
| OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:38 using doxygen 1.8.5 |