lppl  v2.0.0
WeightedMeanStd< typename, O, Ts > Struct Template Reference

Computes the mean and standard deviation of the specified sample site with O(1) memory. More...

#include "query.hpp"

Inheritance diagram for WeightedMeanStd< typename, O, Ts >:
Queryer< WeightedMeanStd, std::pair< double, double >, O, Ts... >

Public Member Functions

 WeightedMeanStd (std::string address)
 
void clear ()
 
std::pair< double, double > emit ()
 
void update (record_t< DTypes< Ts... >> &r, O output, double weight, inf_options_t opts)
 
- Public Member Functions inherited from Queryer< WeightedMeanStd, std::pair< double, double >, O, Ts... >
std::pair< double, double > emit ()
 Emits the result of the query.
 
void update (record_t< DTypes< Ts... >> &r, O output, double weight, inf_options_t opts)
 Updates the state of the queryer. More...
 

Public Attributes

std::string address_
 
double mean_
 
double mean_old
 
double std_
 
std::shared_ptr< LogSumExpQ< double, O, Ts... > > w
 

Detailed Description

template<typename, typename O, typename... Ts>
struct WeightedMeanStd< typename, O, Ts >

Computes the mean and standard deviation of the specified sample site with O(1) memory.

Template Parameters
OThe output type of the probabilistic program
TsThe types of distributions contained in the probabilistic program

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