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

histogram statistics More...

#include <simlib.h>

Inheritance diagram for simlib3::Histogram:
Collaboration diagram for simlib3::Histogram:

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

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

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 729 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, dptr, low, and step.

◆ 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 748 of file simlib.h.

References count.

◆ High()

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

Definition at line 746 of file simlib.h.

References count, low, and step.

◆ Init()

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

◆ Low()

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

Definition at line 745 of file simlib.h.

References low.

◆ 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 count, dptr, low, simlib3::SimObject::Name(), simlib3::Stat::Output(), simlib3::Print(), stat, and step.

◆ Step()

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

Definition at line 747 of file simlib.h.

References step.

Member Data Documentation

◆ count

unsigned simlib3::Histogram::count
protected

Definition at line 734 of file simlib.h.

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

◆ dptr

unsigned* simlib3::Histogram::dptr
protected

◆ low

double simlib3::Histogram::low
protected

Definition at line 732 of file simlib.h.

Referenced by High(), Histogram(), Histogram(), Histogram(), Init(), Low(), operator()(), and Output().

◆ stat

Stat simlib3::Histogram::stat

Definition at line 736 of file simlib.h.

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

◆ step

double simlib3::Histogram::step
protected

Definition at line 733 of file simlib.h.

Referenced by High(), Histogram(), Histogram(), Histogram(), Init(), operator()(), Output(), and Step().


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