BIE::HistogramNDCache Class Reference

General n-dimensional histogram implemented in terms of a chained hash. More...

#include <HistogramNDCache.h>

Inheritance diagram for BIE::HistogramNDCache:
Collaboration diagram for BIE::HistogramNDCache:

List of all members.

Public Member Functions

 HistogramNDCache ()
 Null constructor.
 HistogramNDCache (vector< double > *lo_in, vector< double > *hi_in, vector< double > *width_in, RecordType *type)
 Standard constructor taking a RecordType to define dimensions.
 HistogramNDCache (vector< double > *lo_in, vector< double > *hi_in, vector< double > *width_in, vector< string > *names)
 Constructor taking data field names to define dimensions.
virtual ~HistogramNDCache ()
 Destructor.
virtual HistogramNDCacheNew ()
 Factory method.
double PDF (vector< double > &x)
 The partial distribution function value for an input vector.
double logPDF (vector< double > &x)
 The log of the partial distribution function.
double CDF (vector< double > &x)
 The cumulative distribution function value for an input vector.
vector< double > lower (void)
 Return low bin vector (vector dimension is dim).
vector< double > upper (void)
 Return high bin vector (vector dimension is dim).
vector< double > Mean (void)
 Return mean (vector dimension is dim).
vector< double > StdDev (void)
 Return standard deviation (vector dimension is dim).
vector< double > Moments (int i)
 Return the ith moment (vector dimension is dim).
vector< double > Sample (void)
 Sample the histogram.
void ComputeDistribution ()
 Compute the statistics.
int numberData ()
 Binned distribution members.
void Reset ()
 Reset the interator.
void Next ()
 Advance interator.
double getValue ()
 Get the current bin value.
vector< double > getLow ()
 Get the low range for this bin.
vector< double > getHigh ()
 Get the high range for this bin.
int getdim ()
 Return the dimension value dim.

Protected Member Functions

virtual bool OK (vector< double > &x)
 Allowed values (can be overridden to provide custom limits).
void initialize ()
 Common initialization.
void populate_cache ()
 Generate bins in cache.
bool AccumulateData (double v, vector< double > &x)
 Add data to histogram.
bool AccumulateData (double v, RecordBuffer *datapoint)
 From a weight value and record buffer.

Protected Attributes

int dim
 Dimension of the histogram.
HistogramCachehisto
 HistoCache.
mmapHK::iterator hitr
 Iterator.
vector< double > bins
 Bins.
vector< double > low
 Low values.
vector< double > high
 High values.
vector< double > width
 Bin widths.
vector< int > irank
 Return number of bins in each dimension.
vector< int > imarg
 Flag describing dimensions to be marginalized.
double vol
 Total volume of histogram (in parameter space).
double mass
 Total weight on the histogram.
vector< double > mean
 Histogram statistics.
vector< double > square
 Mean square.
vector< double > stdev
 Standard deviation.

Friends

class boost::serialization::access


Detailed Description

General n-dimensional histogram implemented in terms of a chained hash.

This is useful for a multidimensional data space that is sparse. The private member OK can be overriden to impose constraints.


Member Function Documentation

bool BIE::HistogramNDCache::AccumulateData ( double  v,
vector< double > &  x 
) [protected]

Add data to histogram.

From a weight value and vetor

int BIE::HistogramNDCache::numberData (  )  [inline, virtual]

Binned distribution members.

The number of bins in the histogram

Reimplemented from BIE::SampleDistribution.

Here is the call graph for this function:


Member Data Documentation

vector<double> BIE::HistogramNDCache::bins [protected]

Bins.

Storage

vector<double> BIE::HistogramNDCache::mean [protected]

Histogram statistics.

Mean


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

Send suggestions, questions, and feedback to WEINBERG at ASTRO dot UMASS dot EDU.
Documentation generated at Fri Mar 26 00:35:13 2010 by doxygen