lppl  v2.0.0
slice_plate< D, N > Struct Template Reference

Represents a vector of \(N\) random variables. More...

#include "plate.hpp"

Inheritance diagram for slice_plate< D, N >:
slice_base_< D, N >

Public Member Functions

template<typename... Ts>
 slice_plate (std::shared_ptr< std::array< Ts, N >>... ts)
 
double logprob (std::shared_ptr< std::array< DSType< D >, N >> value)
 Computes \( \sum_{1\leq n \leq N} \log p(x_n | z_n)\). More...
 
template<typename RNG >
std::shared_ptr< std::array< DSType< D >, N > > sample (RNG &rng)
 Samples \(x_1,...,x_N \sim p(x_n | z_n)\). More...
 
std::string string () const
 
- Public Member Functions inherited from slice_base_< D, N >
template<typename... Ts>
 slice_base_ (std::shared_ptr< std::array< Ts, N >>... ts)
 

Additional Inherited Members

- Public Types inherited from slice_base_< D, N >
using tuple_type = typename input_types< D >::value
 
- Public Attributes inherited from slice_base_< D, N >
std::array< D, N > dists
 

Detailed Description

template<typename D, size_t N>
struct slice_plate< D, N >

Represents a vector of \(N\) random variables.

Each random variable is drawn from a distribution from the same family but with different parent values. That is, \(x_n \sim p(x|z_n)\) for \(n = 1,...,N\).

Template Parameters
DThe type of the underlying distribution
NThe number of random variables

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