lppl  v2.0.0

◆ update()

template<typename V , typename O , typename... Ts>
void Weighted< V, O, Ts >::update ( record_t< DTypes< Ts... >> &  r,
output,
double  weight,
inf_options_t  opts 
)
inline

Computes \(\log Z = \log \sum_{1 \leq n \leq N} \exp w_n \).

The interpretation of this number depends on the inference algorithm used with the queryer. If an importance sampling algorithm is used, this is the evidence. This number should always be equal to 1 when using a MCMC algorithm.

Parameters
rthe record to use for computing the weight
outputthe output of the program (unused, for API compliance)
weightthe log weight associated with the record
optsthe inference options