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