lppl
v2.0.0
|
A collection of sampled values. More...
#include "query.hpp"
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 > | |
V | 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 |
A collection of sampled values.
V | the type of the sampled value |