|
SIMLIB/C++ 3.09
|
class for statistical information gathering More...
#include <simlib.h>


Public Member Functions | |
| Stat () | |
| Stat (const char *name) | |
| ~Stat () | |
| virtual void | Clear () |
| initialize | |
| void | operator() (double x) |
| record the value | |
| virtual void | Output () const override |
| print statistics | |
| unsigned long | Number () const |
| double | Min () const |
| double | Max () const |
| double | Sum () const |
| double | SumSquare () const |
| double | MeanValue () const |
| double | StdDev () const |
Public Member Functions inherited from simlib3::SimObject | |
| bool | TestAndSetFlag (bool new_value, unsigned n) |
| internal method for flag manipulation is used for algebraic loop checking in continuous blocks | |
| SimObject () | |
| constructor | |
| virtual | ~SimObject () |
| virtual destructor | |
| void * | operator new (size_t size) |
| allocate object, set _flags | |
| void | operator delete (void *ptr) |
| deallocate object | |
| void * | operator new[] (size_t size)=delete |
| void | operator delete[] (void *ptr)=delete |
| bool | isAllocated () const |
| virtual std::string | Name () const |
| get object name | |
| bool | HasName () const |
| void | SetName (const std::string &name) |
| assign the name | |
| virtual void | Output () const |
| print object to default output | |
Protected Attributes | |
| double | sx |
| double | sx2 |
| double | min |
| double | max |
| unsigned long | n |
Protected Attributes inherited from simlib3::SimObject | |
| unsigned | _flags |
| bool flags for internal use (TODO bitfield?) | |
Additional Inherited Members | |
Public Types inherited from simlib3::SimObject | |
| enum | _Flags { _CLEAR_ALL_FLAGS = 0 , _ALLOCATED_FLAG = 1<<0 , _EVAL_FLAG = 1<<1 , _HAS_NAME_FLAG = 1<<2 } |
|
explicit |
Definition at line 49 of file stat.cc.
References Dprintf, and simlib3::SimObject::SetName().
| simlib3::Stat::~Stat | ( | ) |
Definition at line 69 of file stat.cc.
References Dprintf, and simlib3::SimObject::Name().
|
virtual |
initialize
Definition at line 77 of file stat.cc.
References max, min, n, sx, and sx2.
Referenced by simlib3::Queue::clear(), and simlib3::Histogram::Clear().
|
inline |
| double simlib3::Stat::MeanValue | ( | ) | const |
Definition at line 88 of file stat.cc.
References n, simlib3::SIMLIB_error(), StatNoRecError, and sx.
Referenced by Output(), and simlib3::Queue::Output().
|
inline |
|
inline |
| void simlib3::Stat::operator() | ( | double | x | ) |
|
overridevirtual |
print statistics
Reimplemented from simlib3::SimObject.
Definition at line 166 of file output2.cc.
References max, MeanValue(), min, n, simlib3::SimObject::Name(), simlib3::Print(), and StdDev().
Referenced by simlib3::Histogram::Output().
| double simlib3::Stat::StdDev | ( | ) | const |
Definition at line 97 of file stat.cc.
References n, simlib3::SIMLIB_error(), StatDispError, sx, and sx2.
Referenced by Output(), and simlib3::Queue::Output().
|
inline |
|
protected |
|
protected |
|
protected |
Definition at line 569 of file simlib.h.
Referenced by Clear(), MeanValue(), Number(), operator()(), Output(), and StdDev().
|
protected |
Definition at line 565 of file simlib.h.
Referenced by Clear(), MeanValue(), operator()(), StdDev(), and Sum().
|
protected |
Definition at line 566 of file simlib.h.
Referenced by Clear(), operator()(), StdDev(), and SumSquare().