autoppl
v0.8
A C++ template library for probabilistic programming
|
#include <glue.hpp>
Public Types | |
using | lhs_t = LHSNodeType |
using | rhs_t = RHSNodeType |
using | dist_value_t = std::common_type_t< typename util::model_expr_traits< lhs_t >::dist_value_t, typename util::model_expr_traits< rhs_t >::dist_value_t > |
Public Member Functions | |
GlueNode (const lhs_t &lhs, const rhs_t &rhs) noexcept | |
template<class EqNodeFunc > | |
void | traverse (EqNodeFunc &&eq_f) |
template<class EqNodeFunc > | |
void | traverse (EqNodeFunc &&eq_f) const |
auto | pdf () |
auto | log_pdf () |
template<class PtrPackType > | |
auto | ad_log_pdf (const PtrPackType &pack) const |
template<class PtrPackType > | |
void | bind (const PtrPackType &pack) |
void | activate_refcnt () const |
Public Member Functions inherited from ppl::util::BaseCRTP< GlueNode< LHSNodeType, RHSNodeType > > | |
GlueNode< LHSNodeType, RHSNodeType > & | self () |
const GlueNode< LHSNodeType, RHSNodeType > & | self () const |
This class represents a "node" in a model expression that "glues" two sub-model expressions.
using ppl::expr::model::GlueNode< LHSNodeType, RHSNodeType >::dist_value_t = std::common_type_t< typename util::model_expr_traits<lhs_t>::dist_value_t, typename util::model_expr_traits<rhs_t>::dist_value_t > |
using ppl::expr::model::GlueNode< LHSNodeType, RHSNodeType >::lhs_t = LHSNodeType |
using ppl::expr::model::GlueNode< LHSNodeType, RHSNodeType >::rhs_t = RHSNodeType |
|
inlinenoexcept |
|
inline |
|
inline |
Up to constant addition, returns ad expression of log pdf of both sides added together.
|
inline |
|
inline |
Computes left node joint log-pdf then right node joint log-pdf and returns the sum of the two.
|
inline |
Computes left node joint pdf then right node joint pdf and returns the product of the two.
|
inline |
Generic traversal function. Recursively traverses left then right.
|
inline |