30 #ifndef GUM_GIBBS_OPERATOR_H 31 #define GUM_GIBBS_OPERATOR_H 33 #include <agrum/BN/IBayesNet.h> 34 #include <agrum/tools/multidim/instantiation.h> 35 #include <agrum/tools/multidim/potential.h> 48 template <
typename GUM_SCALAR >
55 const NodeProperty< Idx >* hardEv,
57 bool atRandom =
false);
100 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 106 #include <agrum/BN/inference/tools/gibbsOperator_tpl.h> bool isDrawnAtRandom() const
GibbsOperator(const IBayesNet< GUM_SCALAR > &BN, const NodeProperty< Idx > *hardEv, Size nbr=1, bool atRandom=false)
constructor
Size nbrDrawnVar() const
Getters and setters.
INLINE void emplace(Args &&... args)
void updateSamplingNodes__()
void GibbsSample__(NodeId id, Instantiation *I)
change in Instantiation I a new drawn value for id
void setDrawnAtRandom(bool atRandom)
const IBayesNet< GUM_SCALAR > & sampling_bn_
Instantiation nextSample(Instantiation prev)
draws next sample of Gibbs sampling
virtual ~GibbsOperator()
Destructor.
Instantiation monteCarloSample()
draws a Monte Carlo sample
void drawVarMonteCarlo__(NodeId nod, Instantiation *I)
void setNbrDrawnVar(Size nbr)
const NodeProperty< Idx > * hardEv_
Size counting_
number of samples drawn
class containing all variables and methods required for Gibbssampling
Sequence< NodeId > samplingNodes_