autoppl
v0.8
A C++ template library for probabilistic programming
|
Go to the documentation of this file.
13 template <
class LHSNodeType
18 static_assert(util::is_model_expr_v<LHSNodeType>);
19 static_assert(util::is_model_expr_v<RHSNodeType>);
30 const rhs_t& rhs) noexcept
39 template <
class EqNodeFunc>
46 template <
class EqNodeFunc>
57 auto pdf() {
return lhs_.pdf() * rhs_.pdf(); }
63 auto log_pdf() {
return lhs_.log_pdf() + rhs_.log_pdf(); }
69 template <
class PtrPackType>
72 return (lhs_.ad_log_pdf(pack) +
73 rhs_.ad_log_pdf(pack));
76 template <
class PtrPackType>
77 void bind(
const PtrPackType& pack)
84 lhs_.activate_refcnt();
85 rhs_.activate_refcnt();
Definition: model_expr_traits.hpp:19
void bind(const PtrPackType &pack)
Definition: glue.hpp:77
RHSNodeType rhs_t
Definition: glue.hpp:22
GlueNode(const lhs_t &lhs, const rhs_t &rhs) noexcept
Definition: glue.hpp:29
void activate_refcnt() const
Definition: glue.hpp:83
auto ad_log_pdf(const PtrPackType &pack) const
Definition: glue.hpp:70
void traverse(EqNodeFunc &&eq_f) const
Definition: glue.hpp:47
void traverse(EqNodeFunc &&eq_f)
Definition: glue.hpp:40
auto pdf()
Definition: glue.hpp:57
std::common_type_t< typename util::model_expr_traits< lhs_t >::dist_value_t, typename util::model_expr_traits< rhs_t >::dist_value_t > dist_value_t
Definition: glue.hpp:27
Definition: bounded.hpp:11
LHSNodeType lhs_t
Definition: glue.hpp:21
typename T::dist_value_t dist_value_t
Definition: model_expr_traits.hpp:31
auto log_pdf()
Definition: glue.hpp:63