lppl  v2.0.0
ProductGenerator< Impl, V, O, Ts > Struct Template Reference

Generates a queryer that returns a fully factored collection of views. More...

#include "query.hpp"

Classes

struct  EmitType
 Product of values (mapping from address to result type of underlying queryer) and distributions (mapping from address to first-encountered distribution at that address) More...
 
struct  Q
 A queryer that emits \(V[p(z|x)] = \prod_a V[p(z_a|x)]\). More...
 

Public Types

using DContainer = std::unordered_map< std::string, std::variant< Ts... > >
 
using VContainer = std::unordered_map< std::string, V >
 

Static Public Member Functions

static Q< EmitType, O, Ts... > generate (std::vector< std::string > addresses)
 Generates the queryer that emits \(V[p(z|x)] = \prod_a V[p(z_a|x)]\), where \(a \in \) addresses. More...
 

Detailed Description

template<template< typename, typename, typename... > class Impl, typename V, typename O, typename... Ts>
struct ProductGenerator< Impl, V, O, Ts >

Generates a queryer that returns a fully factored collection of views.

Suppose that \(V[p(z_a|x)]\) is a view of the posterior at address \(a\). Then Productgenerator generates the view \(V[p(z|x)] = \prod_a V[p(z_a|x)]\).

Template Parameters
ImplThe single site view. Must have a constructor taking a single std::string argument the address.
Vthe type that Impl returns via .emit()
Othe type returned by the probabilistic program
Tsthe distribution types in the probabilistic program.

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