A simple histogram.
More...
#include <histogram.h>
|
| | Histogram (int, double=0.0, double=1.0) |
| | Create a histogram.
|
| | Histogram (int, double, double, const QVector< double > &) |
| | Create a histogram from a set.
|
| | Histogram (int, const QVector< double > &) |
| | Create a histogram.
|
|
| ~Histogram () |
| | Empty.
|
| void | Insert (const double &) |
| | Add a value to the histogram.
|
| double | Select (const double &) const |
| | Compute the value in the histogram corresponding to a given percentage of the cumulated values.
|
|
int | Value (int) const |
| | Return the value in a given bin.
|
| double | At (int) const |
| | Compute the entry of a given value.
|
|
int | GetSize () const |
| | Return the size of the histogram.
|
|
Ia | Range () const |
| | Return the range of values of the histogram.
|
|
double | Average () const |
| | Compute the average of the histogram.
|
|
void | Draw (const QString &="Histogram") const |
| | Draw.
|
|
void | ExportPDF (const QString &="histogram.pdf") const |
| | Draw.
|
|
void | ExportPNG (const QString &="histogram.png") const |
| | Draw.
|
| QImage | CreateImage (int=256, int=256, int=3, bool=true) const |
| | Create a (small) image showing the histogram distribution.
|
|
int | MaxCount () const |
| | Compute the value of the highest bin.
|
|
int | TotalCount () const |
| | Compute total number of counts.
|
|
double | Interval () const |
| | Return the width of a bin.
|
|
| int | Index (const double &) const |
| | Compute the entry of a given value.
|
| int | IndexUnit (const double &) const |
| | Compute the entry of a given unit value.
|
|
|
QVector< int > | v |
| | Counts.
|
|
double | b = 1.0 |
| | Interval.
|
A simple histogram.
- See also
- CumulatedHistogram
◆ Histogram() [1/3]
| Histogram::Histogram |
( |
int | size, |
|
|
double | a = 0.0, |
|
|
double | b = 1.0 ) |
|
explicit |
Create a histogram.
- Parameters
-
| a,b | Range. |
| size | Number of bins. |
◆ Histogram() [2/3]
| Histogram::Histogram |
( |
int | size, |
|
|
double | a, |
|
|
double | b, |
|
|
const QVector< double > & | values ) |
Create a histogram from a set.
- Parameters
-
| values | Set of values. |
| a,b | Range. |
| size | Number of bins. |
◆ Histogram() [3/3]
| Histogram::Histogram |
( |
int | size, |
|
|
const QVector< double > & | values ) |
Create a histogram.
- Parameters
-
| size | Number of bins. |
| values | Set of values. |
◆ At()
| double Histogram::At |
( |
int | i | ) |
const |
|
inline |
Compute the entry of a given value.
- Parameters
-
◆ CreateImage()
| QImage Histogram::CreateImage |
( |
int | width = 256, |
|
|
int | height = 256, |
|
|
int | palette = 3, |
|
|
bool | reversed = true ) const |
Create a (small) image showing the histogram distribution.
- Parameters
-
| width,height | Width and height of image. |
| palette | Analytic palette identifier. |
| reversed | Reversed palette. |
◆ Index()
| int Histogram::Index |
( |
const double & | x | ) |
const |
|
inlineprotected |
Compute the entry of a given value.
- Parameters
-
◆ IndexUnit()
| int Histogram::IndexUnit |
( |
const double & | x | ) |
const |
|
inlineprotected |
Compute the entry of a given unit value.
- Parameters
-
◆ Insert()
| void Histogram::Insert |
( |
const double & | x | ) |
|
Add a value to the histogram.
- Parameters
-
◆ Select()
| double Histogram::Select |
( |
const double & | t | ) |
const |
Compute the value in the histogram corresponding to a given percentage of the cumulated values.
This function does not compute the cumulated histogram. If many selections need to be done, it may be faster to compute the cumulated histogram first.
- Parameters
-
| t | Percentage, in [0.0,1.0]. |
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | s, |
|
|
const Histogram & | h ) |
|
friend |