lppl  v2.0.0
value_collection_t< V > Struct Template Reference

A collection of sampled values. More...

#include "query.hpp"

Inheritance diagram for value_collection_t< V >:
collection_t

Public Member Functions

 value_collection_t (std::vector< V > v, Categorical c)
 
 value_collection_t (value_collection_t< V > &&other)
 
template<typename Callable >
value_collection_t< V > & filter (Callable f)
 Filter the vector of posterior samples through a callable. More...
 
template<typename Callable >
value_collection_t< V > & map (Callable f)
 Map the vector of posterior samples thorugh a callable. More...
 
double prob_at (size_t ix)
 Returns the empirical probability of the sample at the specified index. More...
 
template<typename Callable >
reduce (Callable fn)
 Reduce the vector of posterior results to a scalar using a callable. More...
 
template<typename RNG >
std::shared_ptr< V > sample (RNG &rng)
 Samples single value from the empirical posterior. More...
 
template<typename RNG >
std::shared_ptr< std::vector< V > > sample (RNG &rng, size_t n)
 Samples n values with replacement from the empirical posterior. More...
 
size_t size ()
 
- Public Member Functions inherited from collection_t
 collection_t (Categorical c)
 

Public Attributes

std::vector< V > _v
 
- Public Attributes inherited from collection_t
Categorical _c
 

Detailed Description

template<typename V>
struct value_collection_t< V >

A collection of sampled values.

Template Parameters
Vthe type of the sampled value

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