autoppl  v0.8
A C++ template library for probabilistic programming
ppl::expr::var::ForEachNode< VecExprType > Struct Template Reference

#include <for_each.hpp>

Inheritance diagram for ppl::expr::var::ForEachNode< VecExprType >:
ppl::util::VarExprBase< ForEachNode< VecExprType > > ppl::util::BaseCRTP< ForEachNode< VecExprType > >

Public Types

using value_t = typename util::var_expr_traits< elt_t >::value_t
 
using shape_t = typename util::shape_traits< elt_t >::shape_t
 

Public Member Functions

 ForEachNode (const vec_expr_t &vec_expr)
 
template<class Func >
void traverse (Func &&f)
 
template<class Func >
void traverse (Func &&f) const
 
auto get () const
 
auto eval ()
 
constexpr size_t size () const
 
constexpr size_t rows () const
 
constexpr size_t cols () const
 
template<class PtrPackType >
auto ad (const PtrPackType &pack) const
 
template<class PtrPackType >
void bind (const PtrPackType &pack)
 
void activate_refcnt () const
 
- Public Member Functions inherited from ppl::util::BaseCRTP< ForEachNode< VecExprType > >
ForEachNode< VecExprType > & self ()
 
const ForEachNode< VecExprType > & self () const
 

Static Public Attributes

static constexpr bool has_param
 

Detailed Description

template<class VecExprType>
struct ppl::expr::var::ForEachNode< VecExprType >

ForEachNode represents a for-loop where the expressions are contained in a vector. It is a generalization of a GlueNode for variable expressions.

Template Parameters
VecExprTypetype of vector of expressions

Member Typedef Documentation

◆ shape_t

template<class VecExprType >
using ppl::expr::var::ForEachNode< VecExprType >::shape_t = typename util::shape_traits<elt_t>::shape_t

◆ value_t

template<class VecExprType >
using ppl::expr::var::ForEachNode< VecExprType >::value_t = typename util::var_expr_traits<elt_t>::value_t

Constructor & Destructor Documentation

◆ ForEachNode()

template<class VecExprType >
ppl::expr::var::ForEachNode< VecExprType >::ForEachNode ( const vec_expr_t &  vec_expr)
inline

Member Function Documentation

◆ activate_refcnt()

template<class VecExprType >
void ppl::expr::var::ForEachNode< VecExprType >::activate_refcnt ( ) const
inline

◆ ad()

template<class VecExprType >
template<class PtrPackType >
auto ppl::expr::var::ForEachNode< VecExprType >::ad ( const PtrPackType &  pack) const
inline

◆ bind()

template<class VecExprType >
template<class PtrPackType >
void ppl::expr::var::ForEachNode< VecExprType >::bind ( const PtrPackType &  pack)
inline

◆ cols()

template<class VecExprType >
constexpr size_t ppl::expr::var::ForEachNode< VecExprType >::cols ( ) const
inlineconstexpr

◆ eval()

template<class VecExprType >
auto ppl::expr::var::ForEachNode< VecExprType >::eval ( )
inline

◆ get()

template<class VecExprType >
auto ppl::expr::var::ForEachNode< VecExprType >::get ( ) const
inline

◆ rows()

template<class VecExprType >
constexpr size_t ppl::expr::var::ForEachNode< VecExprType >::rows ( ) const
inlineconstexpr

◆ size()

template<class VecExprType >
constexpr size_t ppl::expr::var::ForEachNode< VecExprType >::size ( ) const
inlineconstexpr

◆ traverse() [1/2]

template<class VecExprType >
template<class Func >
void ppl::expr::var::ForEachNode< VecExprType >::traverse ( Func &&  f)
inline

◆ traverse() [2/2]

template<class VecExprType >
template<class Func >
void ppl::expr::var::ForEachNode< VecExprType >::traverse ( Func &&  f) const
inline

Member Data Documentation

◆ has_param

template<class VecExprType >
constexpr bool ppl::expr::var::ForEachNode< VecExprType >::has_param
staticconstexpr

The documentation for this struct was generated from the following file:
ppl::util::var_expr_traits::has_param
static constexpr bool has_param
Definition: var_expr_traits.hpp:30