Modigliani  2.0
A stochastic simulator for axons, neurons, and networks
Public Member Functions | Public Attributes | Friends | List of all members
modigliani_base::Histogram Class Reference

Histogram class. More...

+ Inheritance diagram for modigliani_base::Histogram:

Public Member Functions

 Histogram (Real minVal=0, Real maxVal=1, Size numberOfBins=10)
 Creates a Histogram. More...
virtual ~Histogram ()
void Reset ()
 Reset the histogram class to object creation values.
void BinValue (Real value)
 Insert the value in the appropriate bin. More...
void Show (bool showHeader=false) const
 Prints the histogram to stdout. More...
std::vector< Real > PDF () const
 Returns the probability density functions. More...
Real ShannonEntropy () const
 Return Shannon entropy. More...

Public Attributes

HistogramBins bins
 brief Histogram bins
Real numBins
 Number of bins.


std::ostream & operator<< (std::ostream &str, const Histogram &self)
 Prints the histogram. More...

Detailed Description

Histogram class.

Constructor & Destructor Documentation

modigliani_base::Histogram::Histogram ( Real  minVal = 0,
Real  maxVal = 1,
Size  numberOfBins = 10 

Creates a Histogram.

minValMinimum value, default 0
maxValMaximum value, default 1
numberOfBinsNumber of bins, default 10

Member Function Documentation

void modigliani_base::Histogram::BinValue ( Real  value)

Insert the value in the appropriate bin.

if the value is outside the range the numOutliers counter variable will be increased instead.

valueThe value to insert
Bound checking is implicitly done by increasing numOutliers
std::vector< Real > modigliani_base::Histogram::PDF ( ) const

Returns the probability density functions.

vector containing the PDF
Real modigliani_base::Histogram::ShannonEntropy ( ) const

Return Shannon entropy.

Entropy in bits
void modigliani_base::Histogram::Show ( bool  showHeader = false) const

Prints the histogram to stdout.

showHeaderWhether to show the header, default false

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  str,
const Histogram self 

Prints the histogram.

strostream to output into

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