SIMLIB/C++ 3.09
Loading...
Searching...
No Matches
simlib3::TStat Class Reference

time dependent statistic More...

#include <simlib.h>

Inheritance diagram for simlib3::TStat:
Collaboration diagram for simlib3::TStat:

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
virtual void Output () const override
 print object to default output
virtual void operator() (double x)
 record the value
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
 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

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?)

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 597 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, max, min, n, sx2t, sxt, t0, simlib3::Time, tl, and xl.

Referenced by Queue.

◆ TStat() [2/2]

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

Definition at line 42 of file tstat.cc.

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

◆ ~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::Facility::Clear(), simlib3::Store::Clear(), simlib3::Queue::clear(), and Queue.

◆ LastTime()

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

Definition at line 623 of file simlib.h.

References tl.

◆ LastValue()

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

Definition at line 624 of file simlib.h.

References xl.

◆ Max()

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

Definition at line 619 of file simlib.h.

References max.

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

◆ MeanValue()

double simlib3::TStat::MeanValue ( ) const

◆ Min()

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

Definition at line 618 of file simlib.h.

References min.

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

◆ Number()

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

Definition at line 617 of file simlib.h.

References n.

Referenced by simlib3::Facility::Output(), simlib3::Queue::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 max, MeanValue(), min, n, simlib3::SimObject::Name(), simlib3::Print(), t0, and simlib3::Time.

Referenced by Queue.

◆ StartTime()

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

Definition at line 622 of file simlib.h.

References t0.

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

◆ Sum()

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

Definition at line 620 of file simlib.h.

References sxt.

◆ SumSquare()

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

Definition at line 621 of file simlib.h.

References sx2t.

◆ Facility

friend class Facility
friend

Definition at line 607 of file simlib.h.

References Facility.

Referenced by Facility.

◆ Queue

friend class Queue
friend

Definition at line 609 of file simlib.h.

References Clear(), Output(), Queue, and TStat().

Referenced by Queue.

◆ Store

friend class Store
friend

Definition at line 608 of file simlib.h.

References Store.

Referenced by Store.

Member Data Documentation

◆ max

double simlib3::TStat::max
protected

Definition at line 602 of file simlib.h.

Referenced by Clear(), Max(), operator()(), Output(), TStat(), and TStat().

◆ min

double simlib3::TStat::min
protected

Definition at line 601 of file simlib.h.

Referenced by Clear(), Min(), operator()(), Output(), TStat(), and TStat().

◆ n

unsigned long simlib3::TStat::n
protected

◆ sx2t

double simlib3::TStat::sx2t
protected

Definition at line 600 of file simlib.h.

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

◆ sxt

double simlib3::TStat::sxt
protected

Definition at line 599 of file simlib.h.

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

◆ t0

double simlib3::TStat::t0
protected

Definition at line 603 of file simlib.h.

Referenced by Clear(), MeanValue(), Output(), StartTime(), TStat(), and TStat().

◆ tl

double simlib3::TStat::tl
protected

Definition at line 604 of file simlib.h.

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

◆ xl

double simlib3::TStat::xl
protected

Definition at line 605 of file simlib.h.

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


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