SIMLIB/C++
3.07
|
histogram statistics More...
#include <simlib.h>
Public Member Functions | |
Histogram () | |
Histogram (double low, double step, unsigned count=10) | |
Histogram (const char *_name, double low, double step, unsigned count=10) | |
~Histogram () | |
virtual void | Output () const override |
print to default output More... | |
void | Init (double low, double step, unsigned count) |
void | operator() (double x) |
virtual void | Clear () |
double | Low () const |
double | High () const |
double | Step () const |
unsigned | Count () const |
unsigned | operator[] (unsigned i) const |
![]() | |
bool | TestAndSetFlag (bool new_value, unsigned n) |
internal method for flag manipulation is used for algebraic loop checking in continuous blocks More... | |
SimObject () | |
constructor More... | |
virtual | ~SimObject () |
virtual destructor More... | |
void * | operator new (size_t size) |
allocate object, set _flags More... | |
void | operator delete (void *ptr) |
deallocate object More... | |
void * | operator new[] (size_t size)=delete |
void | operator delete[] (void *ptr)=delete |
bool | isAllocated () const |
virtual std::string | Name () const |
get object name More... | |
bool | HasName () const |
void | SetName (const std::string &name) |
assign the name More... | |
Public Attributes | |
Stat | stat |
Protected Attributes | |
unsigned * | dptr |
double | low |
double | step |
unsigned | count |
![]() | |
unsigned | _flags |
bool flags for internal use (TODO bitfield?) More... | |
Additional Inherited Members | |
![]() | |
enum | _Flags { _CLEAR_ALL_FLAGS = 0, _ALLOCATED_FLAG = 1<<0, _EVAL_FLAG = 1<<1, _HAS_NAME_FLAG = 1<<2 } |
simlib3::Histogram::Histogram | ( | ) |
simlib3::Histogram::Histogram | ( | double | low, |
double | step, | ||
unsigned | count = 10 |
||
) |
Definition at line 58 of file histo.cc.
References simlib3::Alloc(), count, Dprintf, dptr, simlib3::HistoCountError, simlib3::HistoStepError, and simlib3::SIMLIB_error().
simlib3::Histogram::Histogram | ( | const char * | _name, |
double | low, | ||
double | step, | ||
unsigned | count = 10 |
||
) |
Definition at line 69 of file histo.cc.
References simlib3::Alloc(), count, Dprintf, dptr, simlib3::HistoCountError, simlib3::HistoStepError, simlib3::SimObject::SetName(), and simlib3::SIMLIB_error().
simlib3::Histogram::~Histogram | ( | ) |
Definition at line 84 of file histo.cc.
References Dprintf, dptr, and simlib3::SimObject::Name().
|
virtual |
void simlib3::Histogram::Init | ( | double | low, |
double | step, | ||
unsigned | count | ||
) |
Definition at line 120 of file histo.cc.
References simlib3::Alloc(), Clear(), count, Dprintf, dptr, simlib3::HistoCountError, simlib3::HistoStepError, low, simlib3::SIMLIB_error(), and step.
void simlib3::Histogram::operator() | ( | double | x | ) |
unsigned simlib3::Histogram::operator[] | ( | unsigned | i | ) | const |
|
overridevirtual |
print to default output
Reimplemented from simlib3::SimObject.
Definition at line 76 of file output2.cc.
References simlib3::SimObject::Name(), and simlib3::Print().
|
protected |
Definition at line 729 of file simlib.h.
Referenced by Clear(), Histogram(), Init(), operator()(), and operator[]().
|
protected |
Definition at line 726 of file simlib.h.
Referenced by Clear(), Histogram(), Init(), operator()(), operator[](), and ~Histogram().
|
protected |
Definition at line 727 of file simlib.h.
Referenced by Init(), and operator()().
Stat simlib3::Histogram::stat |
Definition at line 731 of file simlib.h.
Referenced by Clear(), and operator()().
|
protected |
Definition at line 728 of file simlib.h.
Referenced by Init(), and operator()().