#include <quantum.h>
Public Member Functions  
Histogram (bool i_softends=false, bool i_log=false)  
Default constructor: constructs an empty histogram with 0 bins and a null [0,0] support (and optional boolean flags).  
Histogram (itype i_bins, bool i_softends=false, bool i_log=false)  
Constructor: constructs an empty histogram with i_bins bins and a null [0,0] support (and optional boolean flags).  
Histogram (itype i_bins, double i_min, double i_max, bool i_softends=false, bool i_log=false)  
Constructor: constructs an empty histogram with i_bins bins and support [i_min,i_max ] (and optional boolean flags).  
void  Reset () 
Empties the histogram, resetting the number of samples to zero.  
void  SetSoftends (bool i_softends) 
Toggles whether the histogram accepts or rejects values outside its support; resets samples to zero.  
void  SetLog (bool i_log) 
Toggles whether the bins are spaced geometrically or arithmetically; resets samples to zero. NOTE: this feature is immature.  
void  SetRange (double i_min, double i_max) 
Redefines the support to [i_min,i_max ]; resets samples to zero.  
void  SetSize (itype i_bins) 
Sets the total number of bins; resets samples to zero.  
itype  Insert (double x) 
Inserts a sample x to the histogram, and returns the index of the incremented bin.  
itype  Frequency (itype bin) 
Returns the number of samples to be found in bin bin .  
itype  Frequency (double x) 
Returns the number of samples to be found in the bin that contains x .  
double  Probability (itype bin) 
Returns the probability that a random sample will be found in bin bin .  
double  Probability (double x) 
Returns the probability that a random sample will be found in the bin that contains x .  
double  ProbabilityDensity (itype bin) 
Returns the probability density in bin bin . NOTE: does not currently work right for log spacing.  
double  ProbabilityDensity (double x) 
Returns the probability density in the bin containing x . See previous entry for details.  
double  BinCenter (itype bin) 
Returns the median value of the bin bin . 
The Histogram class computes a histogram for a sample of real numbers.

Returns the probability that a random sample will be found in bin This is just the number of samples in that bin, divided by the total samples in the histogram. 

Returns the probability that a random sample will be found in the bin that contains This is just the number of samples in that bin, divided by the total samples in the histogram. 

Returns the probability density in bin
Formally, this means the following. Take a random sample from the histogram, and select a random interval of infinitesmal width from within bin
In practice, this is simply 