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);
98 #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 _GibbsSample_(NodeId id, Instantiation *I)
change in Instantiation I a new drawn value for id
void setDrawnAtRandom(bool atRandom)
Instantiation nextSample(Instantiation prev)
draws next sample of Gibbs sampling
void _updateSamplingNodes_()
virtual ~GibbsOperator()
Destructor.
Instantiation monteCarloSample()
draws a Monte Carlo sample
void setNbrDrawnVar(Size nbr)
void _drawVarMonteCarlo_(NodeId nod, Instantiation *I)
const IBayesNet< GUM_SCALAR > & samplingBn_
const NodeProperty< Idx > * hardEv_
class containing all variables and methods required for Gibbssampling
Sequence< NodeId > samplingNodes_