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

histogram statistics More...

#include <simlib.h>

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

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
 
- 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...
 

Public Attributes

Stat stat
 

Protected Attributes

unsigned * dptr
 
double low
 
double step
 
unsigned count
 
- Protected Attributes inherited from simlib3::SimObject
unsigned _flags
 bool flags for internal use (TODO bitfield?) More...
 

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

histogram statistics

Definition at line 724 of file simlib.h.

Constructor & Destructor Documentation

◆ Histogram() [1/3]

simlib3::Histogram::Histogram ( )

Definition at line 49 of file histo.cc.

References simlib3::Alloc(), count, Dprintf, and dptr.

◆ Histogram() [2/3]

simlib3::Histogram::Histogram ( double  low,
double  step,
unsigned  count = 10 
)

◆ Histogram() [3/3]

simlib3::Histogram::Histogram ( const char *  _name,
double  low,
double  step,
unsigned  count = 10 
)

◆ ~Histogram()

simlib3::Histogram::~Histogram ( )

Definition at line 84 of file histo.cc.

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

Member Function Documentation

◆ Clear()

void simlib3::Histogram::Clear ( )
virtual

Definition at line 143 of file histo.cc.

References simlib3::Stat::Clear(), count, Dprintf, dptr, and stat.

Referenced by Init().

◆ Count()

unsigned simlib3::Histogram::Count ( ) const
inline

Definition at line 743 of file simlib.h.

◆ High()

double simlib3::Histogram::High ( ) const
inline

Definition at line 741 of file simlib.h.

◆ Init()

void simlib3::Histogram::Init ( double  low,
double  step,
unsigned  count 
)

◆ Low()

double simlib3::Histogram::Low ( ) const
inline

Definition at line 740 of file simlib.h.

◆ operator()()

void simlib3::Histogram::operator() ( double  x)

Definition at line 102 of file histo.cc.

References count, dptr, low, stat, and step.

◆ operator[]()

unsigned simlib3::Histogram::operator[] ( unsigned  i) const

Definition at line 93 of file histo.cc.

References count, and dptr.

◆ Output()

void simlib3::Histogram::Output ( ) 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().

◆ Step()

double simlib3::Histogram::Step ( ) const
inline

Definition at line 742 of file simlib.h.

Member Data Documentation

◆ count

unsigned simlib3::Histogram::count
protected

Definition at line 729 of file simlib.h.

Referenced by Clear(), Histogram(), Init(), operator()(), and operator[]().

◆ dptr

unsigned* simlib3::Histogram::dptr
protected

Definition at line 726 of file simlib.h.

Referenced by Clear(), Histogram(), Init(), operator()(), operator[](), and ~Histogram().

◆ low

double simlib3::Histogram::low
protected

Definition at line 727 of file simlib.h.

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

◆ stat

Stat simlib3::Histogram::stat

Definition at line 731 of file simlib.h.

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

◆ step

double simlib3::Histogram::step
protected

Definition at line 728 of file simlib.h.

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


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