32 Pdf<ColumnVector>(dimension)
36 , _covariance(dimension)
37 , _diffsum(dimension,dimension)
46 #ifdef __CONSTRUCTOR__ 48 cout <<
"MCPDF Constructor: NumSamples = " <<
_listOfSamples.size()
49 <<
", CumPDF Samples = " <<
_CumPDF.size()
51 #endif // __CONSTRUCTOR__ 69 #ifdef __CONSTRUCTOR__ 70 cout <<
"MCPDF Copy Constructor: NumSamples = " <<
_listOfSamples.size()
71 <<
", CumPDF Samples = " <<
_CumPDF.size()
73 #endif // __CONSTRUCTOR__ 116 double current_weight;
119 current_weight =
_it_los->WeightGet();
120 CumSum += ( ((double)
_it_los->ValueGet()) * current_weight );
122 result = (
unsigned int)((CumSum/
_SumWeights) + 0.5);
134 double diffsum, current_weight;
140 current_weight =
_it_los->WeightGet();
141 diff = (
_it_los->ValueGet() - mean);
142 diffsum += (((double)(diff * diff)) * current_weight);
Class PDF: Virtual Base class representing Probability Density Functions.
vector< WeightedSample< T > >::iterator _it_los
vector< WeightedSample< T > > _los
vector< WeightedSample< T > > _listOfSamples
STL-list containing the list of samples.
Monte Carlo Pdf: Sample based implementation of Pdf.
MatrixWrapper::SymmetricMatrix CovarianceGet() const
Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf.
unsigned int DimensionGet() const
Get the dimension of the argument.
vector< double > _CumPDF
STL-iterator.
T ExpectedValueGet() const
Get the expected value E[x] of the pdf.
double _SumWeights
Sum of all weights: used for normalising purposes.
MCPdf(unsigned int num_samples=0, unsigned int dimension=0)
Constructor.
SymmetricMatrix _covariance