eosim::statics::Histogram EoSimulator Programmer's Manual
NAME
Histogram: Abstract Histogram
SYNOPSIS
#include <eosim/statics/histogram.hpp>
namespace eosim {
namespace statics {
class Histogram {
public:
virtual ~Histogram();
void log(double x_, double y_);
void reset();
void setModel(core::Model* model_);
void print();
void print(const char* path_);
void table();
void table(const char* path_);
double getMaxX();
double getMinX();
double getMaxY();
double getMinY();
double getVariance();
double getMean();
std::string getName();
};
}
}
DESCRIPTION
This is the parent class of all Histograms. It contains the basics operations of all histograms but you can’t use it directly. Use one of its subclasses: TimeSeries or TimeWeighted.
CLASS OPERATIONS
~Histogram():
The destructor of Histogram.
void log(double x_, double y_):
This operations register x_ and y_ in the histogram. If the histogram hasn’t been registered to a model, the simulation aborts immediately displaying an error message.
void reset():
This operation erases every value registered in the histogram.
void setModel(core::Model* model_):
This operation registers model_ in the histogram. The programmer shouldn’t invoke this operation because it’s invoked automatically by EoSimulator.
void print():
This operation prints the histogram in the standard output.
void print(const char* path_):
This operation prints the histogram in path_ file.
void table ():
This operation prints a table with the values stored in the histogram in the standard output.
void table (const char* path_):
This operation prints a table with the values stored in the histogram in path_ file.
double getMaxX():
This operation returns the maximum value registered for x. If no value has been stored in the histogram, the simulation aborts immediately displaying an error message.
double getMinX():
This operation returns the minimum value registered for x. If no value has been stored in the histogram, the simulation aborts immediately displaying an error message.
double getMaxY():
This operation returns the maximum value registered for y. If no value has been stored in the histogram, the simulation aborts immediately displaying an error message.
double getMinY():
This operation returns the minimum value registered for y. If no value has been stored in the histogram, the simulation aborts immediately displaying an error message.
double getVariance():
This operation returns the variance registered in the histogram. If no value has been stored in the histogram, the simulation aborts immediately displaying an error message.
double getMean():
This operation returns the mean value registered in the histogram. If no value has been stored in the histogram, the simulation aborts immediately displaying an error message.
std::string getName():
This operation returns the histogram’s name. If no value has been stored in the histogram, the simulation aborts immediately displaying an error message.
SEE ALSO