lppl  v2.0.0
typed_map< Policy, Input, Ds > Struct Template Reference

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...

#include "update.hpp"

Public Types

using value_t = unique_variant_t< typename cat< std::variant< Ds... >, data_types< Ds... >, Input >::type >
 

Public Member Functions

bool contains (std::string name)
 
template<typename D >
Policy< D >::type extract (std::string name)
 Return a distribution according to a Policy. More...
 
template<typename V >
extract_value (std::string name)
 Return a value or distribution according to original value. More...
 
void insert_or_assign (std::string name, value_t obj)
 
template<typename D >
bool is_transformed (std::string address)
 Is the distribution at the address transformed via a Policy? More...
 

Public Attributes

std::unordered_map< std::string, value_t > map_
 

Detailed Description

template<template< typename > class Policy, typename Input, typename... Ds>
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.

The Policy parameter defines an injection \(policy: \{D_i\}_{i \in I} \rightarrow \{D_j\}_{j \in J}\), \(J \subseteq I\). This is implemented as typename Policy<D>::type, which may be a bijection (e.g., when updating parameters in the same distributional family) or may not (e.g., a normal approximation).

Template Parameters
Policyencapsulates the types of distributions that can be returned by get. Must define type with a using-declaration.
IThe input type
DsThe universe of allowable distribution types

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