#include <eosim/statics/histogram.hpp>
Inheritance diagram for eosim::statics::Histogram:
This is the parent class of all Histograms. It contains the basics operations of all histograms but you can’t use it directly. Histograms store punctual values, but the pair (x1, y1) is logged and then the pair (x1, y2) is logged the histogram record the pair (x1, y1 + y2).
Public Member Functions | |
virtual | ~Histogram () |
The destructor of Histogram. | |
void | reset () |
This operation erases every value registered in the histogram. | |
void | print (unsigned int cantCell) |
This operation prints the histogram in the standard output. cantCell indicates how many bars have you histogram. | |
void | print (unsigned int cantCell, const char *path) |
This operation prints the histogram in path file. cantCell indicates how many bars have you histogram. | |
void | table (unsigned int cantCell) |
This operation prints a table with the values stored in the histogram in the standard output . cantCell indicates how many rows have you table. | |
void | table (unsigned int cantCell, const char *path) |
This operation prints a table with the values stored in the histogram in path file. | |
bool | empty () |
This operation returns 1 if the histogram is empty. | |
double | getVariance () |
This operation returns the variance registered in the histogram. | |
double | getMean () |
This operation returns the mean value registered in the histogram. | |
std::string | getName () |
This operation returns the histogram’s name. | |
Protected Member Functions | |
Histogram (std::string name) | |
std::string | printH (unsigned int cantCell, bool graphic) |
This is an auxiliary operation used to print histograms. | |
void | log (double x, double y) |
This operations register x and y in the histogram. | |
Protected Attributes | |
double | count |
double | total |
double | sosq |
std::map< double, double > | cell |
std::pair< double, double > | min |
std::pair< double, double > | max |
std::string | name |
string Histogram::printH | ( | unsigned int | cantCell, | |
bool | graphic | |||
) | [protected] |
This is an auxiliary operation used to print histograms.
Basically the operations Histogram::table and Histogram::print are wrappers for this operation.
If cantCell is less or equal than zero, the values stored in the histogram won't be shown.
void Histogram::log | ( | double | x, | |
double | y | |||
) | [protected] |
This operations register x and y in the histogram.
double Histogram::getVariance | ( | ) |
This operation returns the variance registered in the histogram.
double Histogram::getMean | ( | ) |
This operation returns the mean value registered in the histogram.