lppl  v2.0.0
update.hpp File Reference
#include <unordered_map>
#include <variant>
#include <functional_util.hpp>
#include <record.hpp>

Classes

struct  typed_map< Policy, Input, Ds >
 A unordered map with value type equal to a sum type of input type and one or more distribution types, parameterized by an update Policy. More...
 
struct  Update< Impl, Policy, QueryResult, I, O, Ts >
 Experimental base class of typed_map-based update logic. More...
 
struct  UpdateFilter< Impl, Policy, Queryer, Inference, I, O, Ts >
 A filtering algorithm that operates on typed_map objects. More...
 

Typedefs

template<template< typename > class Policy, typename I , typename O , typename... Ts>
using upp_t = pp_t< typed_map< Policy, I, Ts... > &, O, Ts... >
 Alias to probabilistic programs that take typed_map references as inputs. More...
 

Functions

template<template< template< typename > class, typename, typename, typename... > class Impl, template< typename > class Policy, class Queryer , class Inference , typename I , typename O , typename... Ts>
UpdateFilter< Impl, Policy, Queryer, Inference, I, O, Ts... > filter (upp_t< Policy, I, O, Ts... > &f, Queryer &q, Inference &infer)
 Factory function for UpdateFilter.
 
template<typename V , typename D , template< typename > class Policy, typename I , typename... Ts>
observe_u (record_t< DTypes< Ts... >> &r, std::string address, D dist, typed_map< Policy, I, Ts... > &map_)
 Observe a value from data contained in the typed_map.
 
template<typename D , typename RNG , template< typename > class Policy, typename I , typename... Ts>
DSType< D > sample_u (record_t< DTypes< Ts... >> &r, std::string address, typed_map< Policy, I, Ts... > &map_, RNG &rng)
 Sample a value from the addressed distribution in the typed_map More...
 
template<template< template< typename > class, typename, typename, typename... > class Impl, template< typename > class Policy, typename QueryResult , typename I , typename O , typename... Ts>
Update< Impl, Policy, QueryResult, I, O, Ts... > update (upp_t< Policy, I, O, Ts... > &f)
 Factory function for Updater. More...
 

Detailed Description

This file is part of fmcs. Copyright David Rushing Dewhurst, 2023 - present. Some rights reserved.