autoppl  v0.8
A C++ template library for probabilistic programming
ppl::expr::model::GlueNode< LHSNodeType, RHSNodeType > Struct Template Reference

#include <glue.hpp>

Inheritance diagram for ppl::expr::model::GlueNode< LHSNodeType, RHSNodeType >:
ppl::util::ModelExprBase< GlueNode< LHSNodeType, RHSNodeType > > ppl::util::BaseCRTP< GlueNode< LHSNodeType, RHSNodeType > >

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
 

Detailed Description

template<class LHSNodeType, class RHSNodeType>
struct ppl::expr::model::GlueNode< LHSNodeType, RHSNodeType >

This class represents a "node" in a model expression that "glues" two sub-model expressions.

Member Typedef Documentation

◆ dist_value_t

template<class LHSNodeType , class RHSNodeType >
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 >

◆ lhs_t

template<class LHSNodeType , class RHSNodeType >
using ppl::expr::model::GlueNode< LHSNodeType, RHSNodeType >::lhs_t = LHSNodeType

◆ rhs_t

template<class LHSNodeType , class RHSNodeType >
using ppl::expr::model::GlueNode< LHSNodeType, RHSNodeType >::rhs_t = RHSNodeType

Constructor & Destructor Documentation

◆ GlueNode()

template<class LHSNodeType , class RHSNodeType >
ppl::expr::model::GlueNode< LHSNodeType, RHSNodeType >::GlueNode ( const lhs_t lhs,
const rhs_t rhs 
)
inlinenoexcept

Member Function Documentation

◆ activate_refcnt()

template<class LHSNodeType , class RHSNodeType >
void ppl::expr::model::GlueNode< LHSNodeType, RHSNodeType >::activate_refcnt ( ) const
inline

◆ ad_log_pdf()

template<class LHSNodeType , class RHSNodeType >
template<class PtrPackType >
auto ppl::expr::model::GlueNode< LHSNodeType, RHSNodeType >::ad_log_pdf ( const PtrPackType &  pack) const
inline

Up to constant addition, returns ad expression of log pdf of both sides added together.

◆ bind()

template<class LHSNodeType , class RHSNodeType >
template<class PtrPackType >
void ppl::expr::model::GlueNode< LHSNodeType, RHSNodeType >::bind ( const PtrPackType &  pack)
inline

◆ log_pdf()

template<class LHSNodeType , class RHSNodeType >
auto ppl::expr::model::GlueNode< LHSNodeType, RHSNodeType >::log_pdf ( )
inline

Computes left node joint log-pdf then right node joint log-pdf and returns the sum of the two.

◆ pdf()

template<class LHSNodeType , class RHSNodeType >
auto ppl::expr::model::GlueNode< LHSNodeType, RHSNodeType >::pdf ( )
inline

Computes left node joint pdf then right node joint pdf and returns the product of the two.

◆ traverse() [1/2]

template<class LHSNodeType , class RHSNodeType >
template<class EqNodeFunc >
void ppl::expr::model::GlueNode< LHSNodeType, RHSNodeType >::traverse ( EqNodeFunc &&  eq_f)
inline

Generic traversal function. Recursively traverses left then right.

◆ traverse() [2/2]

template<class LHSNodeType , class RHSNodeType >
template<class EqNodeFunc >
void ppl::expr::model::GlueNode< LHSNodeType, RHSNodeType >::traverse ( EqNodeFunc &&  eq_f) const
inline

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