autoppl  v0.8
A C++ template library for probabilistic programming
ppl::expr::dist::Bernoulli< PType > Struct Template Reference

#include <bernoulli.hpp>

Inheritance diagram for ppl::expr::dist::Bernoulli< PType >:
ppl::util::DistExprBase< Bernoulli< PType > > ppl::util::BaseCRTP< Bernoulli< PType > >

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
 

Detailed Description

template<class PType>
struct ppl::expr::dist::Bernoulli< PType >

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.

Template Parameters
PTypeprobability variable expression type. Cannot be a matrix shape.

Member Typedef Documentation

◆ base_t

template<class PType >
using ppl::expr::dist::Bernoulli< PType >::base_t = util::DistExprBase<Bernoulli<p_t> >

◆ dist_value_t

template<class PType >
using ppl::util::DistExprBase< T >::dist_value_t = util::dist_value_t

◆ param_value_t

template<class PType >
using ppl::expr::dist::Bernoulli< PType >::param_value_t = typename util::var_expr_traits<p_t>::value_t

◆ value_t

template<class PType >
using ppl::expr::dist::Bernoulli< PType >::value_t = util::disc_param_t

Constructor & Destructor Documentation

◆ Bernoulli()

template<class PType >
ppl::expr::dist::Bernoulli< PType >::Bernoulli ( const p_t &  p)
inline

Member Function Documentation

◆ activate_refcnt()

template<class PType >
void ppl::expr::dist::Bernoulli< PType >::activate_refcnt ( ) const
inline

◆ ad_log_pdf()

template<class PType >
template<class XType , class PtrPackType >
auto ppl::expr::dist::Bernoulli< PType >::ad_log_pdf ( const XType &  x,
const PtrPackType &  pack 
) const
inline

◆ bind()

template<class PType >
template<class PtrPackType >
void ppl::expr::dist::Bernoulli< PType >::bind ( const PtrPackType &  pack)
inline

◆ log_pdf()

template<class PType >
template<class XType >
dist_value_t ppl::expr::dist::Bernoulli< PType >::log_pdf ( const XType &  x)
inline

◆ pdf()

template<class PType >
template<class XType >
dist_value_t ppl::expr::dist::Bernoulli< PType >::pdf ( const XType &  x)
inline

◆ prune()

template<class PType >
template<class XType , class GenType >
bool ppl::expr::dist::Bernoulli< PType >::prune ( XType &  x,
GenType &   
) const
inline

The documentation for this struct was generated from the following file: