Histogram Class Reference
Histogram class.
More...
#include <histogram.h>
List of all members.
Public Member Functions |
| Histogram (int *densityCount, int noSamples) |
| Constructs a histogram.
|
| ~Histogram () |
| Destructor.
|
int | getNoSamples () |
double | densitySize (int index) |
| Returns the density (normalized number of samples with value "index").
|
QPoint * | getQPointData (int verticalSize, int columnWidth, int pixelsPerStep, bool isBottomZero) |
| Retrieves a list of points which when drawn as a polygon show the shape of a density distribution.
|
Detailed Description
Histogram class.
Constructor & Destructor Documentation
Histogram::Histogram |
( |
int * |
densityCount, |
|
|
int |
noSamples | |
|
) |
| | |
Constructs a histogram.
- Parameters:
-
| an | array of density counts, ie densityCount[10] is the number of samples with density 10. |
| noSamples | number densityCount array items, ie number of densities that can occur. |
Histogram::~Histogram |
( |
|
) |
|
Member Function Documentation
double Histogram::densitySize |
( |
int |
index |
) |
|
Returns the density (normalized number of samples with value "index").
For index = 0, this would return amount of samples with density 0 relative to the highest density count.
- Parameters:
-
| index | density we're querrying. |
- Returns:
- value between 0 and 1, 1 if the number of samples for the given density is the same as the number of samples for the most common density, 0.5 if it's exactly half the number, and 0.0 if there are no samples.
int Histogram::getNoSamples |
( |
|
) |
[inline] |
QPoint * Histogram::getQPointData |
( |
int |
verticalSize, |
|
|
int |
columnWidth, |
|
|
int |
pixelsPerStep, |
|
|
bool |
isBottomZero | |
|
) |
| | |
Retrieves a list of points which when drawn as a polygon show the shape of a density distribution.
- Parameters:
-
| verticalSize | vertical size, in pixels |
| columnWidth | number of pixels per histogram column |
| pixelsPerStep | |
| isBottomZero | vertical orientation, ie. should the polygon be rugged on top (true) or on bottom (false) |
- Returns:
- a list of noSamples (as specified in the constructor) / pixelsPerStep + 2 points
The documentation for this class was generated from the following files:
- C:/Documents and Settings/benesova/Plocha/FlowVis/vislab2/histogram.h
- C:/Documents and Settings/benesova/Plocha/FlowVis/vislab2/histogram.cpp