SIMLIB/C++  3.07
Public Member Functions | Protected Attributes | Friends | List of all members
simlib3::TStat Class Reference

time dependent statistic More...

#include <simlib.h>

Inheritance diagram for simlib3::TStat:
Inheritance graph
[legend]
Collaboration diagram for simlib3::TStat:
Collaboration graph
[legend]

Public Member Functions

 TStat (double initval=0.0)
 
 TStat (const char *name, double initval=0.0)
 
 ~TStat ()
 
virtual void Clear (double initval=0.0)
 initialize More...
 
virtual void Output () const override
 print object to default output More...
 
virtual void operator() (double x)
 record the value More...
 
unsigned long Number () const
 
double Min () const
 
double Max () const
 
double Sum () const
 
double SumSquare () const
 
double StartTime () const
 
double LastTime () const
 
double LastValue () const
 
double MeanValue () 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 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...
 

Protected Attributes

double sxt
 
double sx2t
 
double min
 
double max
 
double t0
 
double tl
 
double xl
 
unsigned long n
 
- Protected Attributes inherited from simlib3::SimObject
unsigned _flags
 bool flags for internal use (TODO bitfield?) More...
 

Friends

class Facility
 
class Store
 
class Queue
 

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 }
 

Detailed Description

time dependent statistic

Definition at line 592 of file simlib.h.

Constructor & Destructor Documentation

◆ TStat() [1/2]

simlib3::TStat::TStat ( double  initval = 0.0)
explicit

Definition at line 32 of file tstat.cc.

References Dprintf.

◆ TStat() [2/2]

simlib3::TStat::TStat ( const char *  name,
double  initval = 0.0 
)
explicit

Definition at line 42 of file tstat.cc.

References Dprintf, and simlib3::SimObject::SetName().

◆ ~TStat()

simlib3::TStat::~TStat ( )

Definition at line 56 of file tstat.cc.

References Dprintf, and simlib3::SimObject::Name().

Member Function Documentation

◆ Clear()

void simlib3::TStat::Clear ( double  initval = 0.0)
virtual

initialize

Definition at line 83 of file tstat.cc.

References Dprintf, max, min, n, simlib3::SimObject::Name(), sx2t, sxt, t0, simlib3::Time, tl, and xl.

Referenced by simlib3::Queue::clear(), simlib3::Facility::Clear(), and simlib3::Store::Clear().

◆ LastTime()

double simlib3::TStat::LastTime ( ) const
inline

Definition at line 618 of file simlib.h.

◆ LastValue()

double simlib3::TStat::LastValue ( ) const
inline

Definition at line 619 of file simlib.h.

◆ Max()

double simlib3::TStat::Max ( ) const
inline

Definition at line 614 of file simlib.h.

References simlib3::max().

Referenced by simlib3::Store::Output().

◆ MeanValue()

double simlib3::TStat::MeanValue ( ) const

◆ Min()

double simlib3::TStat::Min ( ) const
inline

Definition at line 613 of file simlib.h.

References simlib3::min().

Referenced by simlib3::Store::Output().

◆ Number()

unsigned long simlib3::TStat::Number ( ) const
inline

Definition at line 612 of file simlib.h.

Referenced by simlib3::Facility::Output(), and simlib3::Store::Output().

◆ operator()()

void simlib3::TStat::operator() ( double  x)
virtual

record the value

Definition at line 64 of file tstat.cc.

References max, min, n, simlib3::SIMLIB_warning(), sx2t, sxt, simlib3::Time, tl, simlib3::TStatNotInitialized, and xl.

◆ Output()

void simlib3::TStat::Output ( ) const
overridevirtual

print object to default output

Reimplemented from simlib3::SimObject.

Definition at line 223 of file output2.cc.

References simlib3::max(), simlib3::min(), simlib3::SimObject::Name(), simlib3::Print(), and simlib3::Time.

◆ StartTime()

double simlib3::TStat::StartTime ( ) const
inline

Definition at line 617 of file simlib.h.

Referenced by simlib3::Facility::Output(), and simlib3::Store::Output().

◆ Sum()

double simlib3::TStat::Sum ( ) const
inline

Definition at line 615 of file simlib.h.

◆ SumSquare()

double simlib3::TStat::SumSquare ( ) const
inline

Definition at line 616 of file simlib.h.

Friends And Related Function Documentation

◆ Facility

friend class Facility
friend

Definition at line 602 of file simlib.h.

◆ Queue

friend class Queue
friend

Definition at line 604 of file simlib.h.

◆ Store

friend class Store
friend

Definition at line 603 of file simlib.h.

Member Data Documentation

◆ max

double simlib3::TStat::max
protected

Definition at line 597 of file simlib.h.

Referenced by Clear(), and operator()().

◆ min

double simlib3::TStat::min
protected

Definition at line 596 of file simlib.h.

Referenced by Clear(), and operator()().

◆ n

unsigned long simlib3::TStat::n
protected

◆ sx2t

double simlib3::TStat::sx2t
protected

Definition at line 595 of file simlib.h.

Referenced by Clear(), and operator()().

◆ sxt

double simlib3::TStat::sxt
protected

Definition at line 594 of file simlib.h.

Referenced by Clear(), MeanValue(), and operator()().

◆ t0

double simlib3::TStat::t0
protected

Definition at line 598 of file simlib.h.

Referenced by Clear(), and MeanValue().

◆ tl

double simlib3::TStat::tl
protected

Definition at line 599 of file simlib.h.

Referenced by Clear(), MeanValue(), and operator()().

◆ xl

double simlib3::TStat::xl
protected

Definition at line 600 of file simlib.h.

Referenced by Clear(), MeanValue(), and operator()().


The documentation for this class was generated from the following files: