38 template <
typename GUM_SCALAR >
46 template <
typename GUM_SCALAR >
52 template <
typename GUM_SCALAR >
59 template <
typename GUM_SCALAR >
63 bool wrong_value =
false;
67 for (
const auto nod: this->
BN().topologicalOrder()) {
75 }
while (wrong_value);
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Class representing the minimal interface for Bayesian Network.
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Instantiation _burnIn() override
draws a defined number of samples without updating the estimators
Idx val(Idx i) const
Returns the current value of the variable at position i.
<agrum/BN/inference/samplingInference.h>
void clear()
Erase all variables from an Instantiation.
const NodeProperty< Idx > & hardEvidence() const
indicate for each node with hard evidence which value it took
~MonteCarloSampling() override
Destructor.
const NodeSet & hardEvidenceNodes() const
returns the set of nodes with hard evidence
Class for assigning/browsing values to tuples of discrete variables.
virtual void _addVarSample(NodeId nod, Instantiation *I)
adds a node to current instantiation
Instantiation _draw(GUM_SCALAR *w, Instantiation prev) override
draws a sample according to classic Monte Carlo sampling
virtual const IBayesNet< GUM_SCALAR > & BN() const final
Returns a constant reference over the IBayesNet referenced by this class.
MonteCarloSampling(const IBayesNet< GUM_SCALAR > *bn)
Default constructor.