예제 #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();
   }
 }
예제 #2
0
 double NormalDistribution<1>::pdf(const RandomVariable& value) const {
   return exp(logpdf(value));
 }
예제 #3
0
 double nlogpdf(const Distribution &d, const Eigen::VectorXd &x)
 {
   return -logpdf(d, x);
 }
예제 #4
0
 double pdf(const Distribution &d, const Eigen::VectorXd &x)
 {
   return std::exp(logpdf(d, x));
 }