42 inline double c(
int i )
const {
return _c[i]; }
52 virtual double pdf(
const T& p )
const;
61 for ( i = 0; i < other.nTerms(); i++ )
63 _c.push_back( other._c[i] );
64 _term.push_back( other._term[i]->clone() );
70 for ( i = 0; i <
_c.size(); i++ )
delete _term[i];
112 for ( i = 0; i <
nTerms(); i++ )
114 double itg =
_term[i]->getItg().value();
116 if ( sum > rnd )
break;
119 return _term[i]->randomPoint();
virtual EvtValError compute_integral() const
virtual EvtPdf< T > * clone() const
EvtPdf< T > * getPdf(int i) const
void addTerm(double c, const EvtPdf< T > &pdf)
virtual double pdf(const T &p) const
vector< EvtPdf< T > * > _term
void addOwnedTerm(double c, EvtPdf< T > *pdf)
double evaluate(const T &p) const
EvtValError getItg() const