Herwig++
2.7.0
|
Aka histogram, yet not intented for analyses. More...
#include <BinnedStatistics.h>
Public Member Functions | |
double | sample (double &point) |
Sample a point and return its weight to be divided out as a bias. | |
void | bin (double point) |
Get a bin corresponding to a given point. | |
void | select (double w) |
Select the last sampled point with a given weight. | |
void | accept () |
Accept the last sampled point. | |
void | reject () |
Reject the last sampled point. | |
void | initialize (unsigned int bins) |
Initialize with flat sampling over the complete range, using the given number of bins to accumulate statistics. | |
const map< double, GeneralStatistics > & | statistics () const |
Return the bins. | |
template<class Adaptor > | |
void | update (const Adaptor &ap) |
Update the sampling bins to reflect the accumulated statistics and binning used. | |
template<class Adaptor > | |
void | adapt (const Adaptor &ap) |
Half those bins, which meet the given predicate and update the statistics. | |
Standard constructors and destructors. | |
BinnedStatistics () | |
The default constructor. | |
BinnedStatistics (unsigned int bins, double threshold=0.001) | |
The standard constructor. | |
virtual | ~BinnedStatistics () |
The destructor. | |
Functions used by the persistent I/O system. | |
void | put (PersistentOStream &os) const |
Function used to write out object persistently. | |
void | get (PersistentIStream &is) |
Function used to read in object persistently. | |
Private Attributes | |
map< double, GeneralStatistics > | statisticsMap |
Map upper bin boundaries to statistics contained. | |
map< double, double > | weightMap |
Map upper bin boundaries to bin weights currently used. | |
map< double, pair< double, double > > | selectorMap |
Selector map to sample a point. | |
double | lastPoint |
The last sampled point. | |
GeneralStatistics * | lastStatistics |
The statistics relevant to the last sampled point. | |
double | theWeightThreshold |
The weight threshold which governs the minimum bin weight. |
Aka histogram, yet not intented for analyses.
Definition at line 33 of file BinnedStatistics.h.
void Herwig::BinnedStatistics::get | ( | PersistentIStream & | is | ) |
Function used to read in object persistently.
is | the persistent input stream read from. |
version | the version number of the object when written. |
void Herwig::BinnedStatistics::put | ( | PersistentOStream & | os | ) | const |
Function used to write out object persistently.
os | the persistent output stream written to. |
map<double,GeneralStatistics> Herwig::BinnedStatistics::statisticsMap [private] |
Map upper bin boundaries to statistics contained.
The lower bin boundary is always 0.
Definition at line 200 of file BinnedStatistics.h.