|
autoppl
v0.8
A C++ template library for probabilistic programming
|
#include <bernoulli.hpp>
Public Types | |
| using | value_t = util::disc_param_t |
| using | param_value_t = typename util::var_expr_traits< p_t >::value_t |
| using | base_t = util::DistExprBase< Bernoulli< p_t > > |
| using | dist_value_t = util::dist_value_t |
Public Types inherited from ppl::util::DistExprBase< Bernoulli< PType > > | |
| using | dist_value_t = util::dist_value_t |
Public Member Functions | |
| Bernoulli (const p_t &p) | |
| template<class XType > | |
| dist_value_t | pdf (const XType &x) |
| template<class XType > | |
| dist_value_t | log_pdf (const XType &x) |
| template<class XType , class PtrPackType > | |
| auto | ad_log_pdf (const XType &x, const PtrPackType &pack) const |
| template<class PtrPackType > | |
| void | bind (const PtrPackType &pack) |
| void | activate_refcnt () const |
| template<class XType , class GenType > | |
| bool | prune (XType &x, GenType &) const |
Public Member Functions inherited from ppl::util::BaseCRTP< Bernoulli< PType > > | |
| Bernoulli< PType > & | self () |
| const Bernoulli< PType > & | self () const |
Bernoulli is a generic expression representing the Bernoulli distribution. Its parameter type PType must satisfy variable expression. It is tagged as a discrete distribution and satisfies distribution expression.
If PType is a vector shape, then this distribution is treated as a joint distribution of n independent Bernoulli (scalar) random variables.
| PType | probability variable expression type. Cannot be a matrix shape. |
| using ppl::expr::dist::Bernoulli< PType >::base_t = util::DistExprBase<Bernoulli<p_t> > |
| using ppl::util::DistExprBase< T >::dist_value_t = util::dist_value_t |
| using ppl::expr::dist::Bernoulli< PType >::param_value_t = typename util::var_expr_traits<p_t>::value_t |
| using ppl::expr::dist::Bernoulli< PType >::value_t = util::disc_param_t |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |