Exemplo n.º 1
0
 double logpdf(const TruncNormal &d, const Eigen::VectorXd &x)
 {
   if (insupport(d, x))
   {
     return logpdf(*static_cast<const Normal *>(&d), x);
   }
   else
   {
     return -std::numeric_limits<double>::infinity();
   }
 }
Exemplo n.º 2
0
 double logpdf(const Uniform &d, const Eigen::VectorXd &x)
 {
   // Check if x is in the support of the distribution
   if (insupport(d, x))
   {
     return 0.0;
   }
   else
   {
     return -std::numeric_limits<double>::infinity();
   }
 }