90 double overlapping_volume = 1;
92 double diff =
std::min(my_max(i), other_max(i)) -
std::max(my_min(i), other_min(i));
96 overlapping_volume *= diff;
105 std::cout << pdf.
toString() << std::endl;
106 assert_msg(
false,
"Uniform likelihood calculation: cannot determine expected value of pdf.");
111 if (other_mean(i) < my_min(i) || other_mean(i) > my_max(i)) {
147 for(
unsigned int i = 0; i <
size_.n_elem; ++i) {
159 s <<
", mean = " <<
mean_ <<
", size = " <<
size_;
arma_warn_unused eT min() const
#define assert_msg(_Expression, _Msg)
virtual bool getExpectedValue(std::string &v) const
arma_inline const Op< T1, op_mean > mean(const Base< typename T1::elem_type, T1 > &X, const uword dim=0)
const Uniform * PDFtoUniform(const PDF &pdf)
Casts a PDF object to a Uniform distribution if the PDF represents a Uniform distribution.
arma_warn_unused eT max() const
virtual std::string toString(const std::string &indent="") const =0
virtual double getLikelihood(const PDF &pdf) const =0