MeanWalker
|
This class implements a two-dimensional histogram. More...
#include <histogram2d.h>
Public Member Functions | |
bool | init (double minValueX, double maxValueX, size_t numBinsX, double minValueY, double maxValueY, size_t numBinsY) |
Initialize the histogram. | |
void | clear () |
Clears the values stored in the histogram (but does not clear the boundaries nor the number of bins). | |
void | destroy () |
Destroys the histogram - you'll need to call Histogram::init again to be able to use it. | |
void | process (double x, double y) |
Processes the coordinate x , y into the histogram. | |
double | getMinValueX () const |
Returns the minimum boundary value in the x-direction that was specified during initialization. | |
double | getMaxValueX () const |
Returns the maximum boundary value in the x-direction that was specified during initialization. | |
size_t | getNumberOfBinsX () const |
Returns the number of bins in the x-direction. | |
double | getMinValueY () const |
Returns the minimum boundary value in the y-direction that was specified during initialization. | |
double | getMaxValueY () const |
Returns the maximum boundary value in the y-direction that was specified during initialization. | |
size_t | getNumberOfBinsY () const |
Returns the number of bins in the y-direction. | |
size_t | getBinCount (size_t bin1, size_t bin2) const |
Returns the number of values that were counted in the specified bin. | |
double | getProbabilityDensity (size_t bin1, size_t bin2) const |
Returns the probability density based on the count in the specified bin. | |
double | getInsideProbabilityDensity (size_t bin1, size_t bin2) const |
Returns the probability density based on the count in the specified bin while pretending that no samples were generated outside the histogram boundaries. | |
double | getBinCenterX (size_t bin1) const |
Returns the center x-coordinate of the specified bin. | |
double | getBinCenterY (size_t bin2) const |
Returns the center y-coordinate of the specified bin. | |
double | getBinWidth () const |
Returns the width of each bin (x-direction). | |
double | getBinHeight () const |
Returns the height of each bin (y-direction). | |
size_t | getTotalCount () const |
Returns the total number of values processed. | |
size_t | getOutsideCount () const |
Returns the processed number of values that fell outside the histogram boundaries. | |
size_t | getInsideCount () const |
Returns the processed number of values that fell inside the histogram boundaries. | |
void | print (bool blocks=true) const |
Print the histogram, or rather the probability distribution associated with the histogram. |
This class implements a two-dimensional histogram.
void meanwalker::Histogram2D::clear | ( | ) |
Clears the values stored in the histogram (but does not clear the boundaries nor the number of bins).
void meanwalker::Histogram2D::destroy | ( | ) |
Destroys the histogram - you'll need to call Histogram::init again to be able to use it.
double meanwalker::Histogram2D::getBinCenterX | ( | size_t | bin1 | ) | const [inline] |
Returns the center x-coordinate of the specified bin.
double meanwalker::Histogram2D::getBinCenterY | ( | size_t | bin2 | ) | const [inline] |
Returns the center y-coordinate of the specified bin.
size_t meanwalker::Histogram2D::getBinCount | ( | size_t | bin1, |
size_t | bin2 | ||
) | const [inline] |
Returns the number of values that were counted in the specified bin.
double meanwalker::Histogram2D::getBinHeight | ( | ) | const [inline] |
Returns the height of each bin (y-direction).
double meanwalker::Histogram2D::getBinWidth | ( | ) | const [inline] |
Returns the width of each bin (x-direction).
size_t meanwalker::Histogram2D::getInsideCount | ( | ) | const [inline] |
Returns the processed number of values that fell inside the histogram boundaries.
double meanwalker::Histogram2D::getInsideProbabilityDensity | ( | size_t | bin1, |
size_t | bin2 | ||
) | const [inline] |
Returns the probability density based on the count in the specified bin while pretending that no samples were generated outside the histogram boundaries.
double meanwalker::Histogram2D::getMaxValueX | ( | ) | const [inline] |
Returns the maximum boundary value in the x-direction that was specified during initialization.
double meanwalker::Histogram2D::getMaxValueY | ( | ) | const [inline] |
Returns the maximum boundary value in the y-direction that was specified during initialization.
double meanwalker::Histogram2D::getMinValueX | ( | ) | const [inline] |
Returns the minimum boundary value in the x-direction that was specified during initialization.
double meanwalker::Histogram2D::getMinValueY | ( | ) | const [inline] |
Returns the minimum boundary value in the y-direction that was specified during initialization.
size_t meanwalker::Histogram2D::getNumberOfBinsX | ( | ) | const [inline] |
Returns the number of bins in the x-direction.
size_t meanwalker::Histogram2D::getNumberOfBinsY | ( | ) | const [inline] |
Returns the number of bins in the y-direction.
size_t meanwalker::Histogram2D::getOutsideCount | ( | ) | const [inline] |
Returns the processed number of values that fell outside the histogram boundaries.
double meanwalker::Histogram2D::getProbabilityDensity | ( | size_t | bin1, |
size_t | bin2 | ||
) | const [inline] |
Returns the probability density based on the count in the specified bin.
size_t meanwalker::Histogram2D::getTotalCount | ( | ) | const [inline] |
Returns the total number of values processed.
bool meanwalker::Histogram2D::init | ( | double | minValueX, |
double | maxValueX, | ||
size_t | numBinsX, | ||
double | minValueY, | ||
double | maxValueY, | ||
size_t | numBinsY | ||
) |
Initialize the histogram.
Initialize the histogram. The on the x-axis, the region between minValueX
and maxValueX
will be subdivided into numBinsX
intervals, on the y-axis, the region between minValueY
and maxValueY
will be subdivided into numBinsY
intervals.
void meanwalker::Histogram2D::print | ( | bool | blocks = true | ) | const |
Print the histogram, or rather the probability distribution associated with the histogram.
void meanwalker::Histogram2D::process | ( | double | x, |
double | y | ||
) | [inline] |
Processes the coordinate x
, y
into the histogram.