27 #ifndef GUM_LOOPYBELIEFPROPAGATION_H 28 #define GUM_LOOPYBELIEFPROPAGATION_H 30 #include <agrum/BN/inference/tools/approximateInference.h> 40 template <
typename GUM_SCALAR >
101 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 102 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 106 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 107 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 113 #include <agrum/BN/inference/loopyBeliefPropagation_tpl.h> virtual void onStateChanged_()
fired when the stage is changed
virtual void makeInference_()
called when the inference has to be performed effectively
virtual void onEvidenceErased_(const NodeId id, bool isHardEvidence)
fired before an evidence is removed
virtual void onModelChanged_(const GraphicalModel *bn)
fired after a new Bayes net has been assigned to the engine
INLINE void emplace(Args &&... args)
Potential< GUM_SCALAR > _computeProdLambda_(NodeId X)
virtual void onEvidenceChanged_(const NodeId id, bool hasChangedSoftHard)
fired after an evidence is changed, in particular when its status (soft/hard) changes ...
virtual void updateOutdatedStructure_()
prepares inference when the latter is in OutdatedStructure state
virtual void onAllMarginalTargetsAdded_()
fired after all the nodes of the BN are added as marginal targets
virtual ~LoopyBeliefPropagation()
Destructor.
virtual void onMarginalTargetAdded_(const NodeId id)
fired after a new marginal target is inserted
Potential< GUM_SCALAR > _computeProdLambda_(NodeId X, NodeId except)
virtual void onEvidenceAdded_(const NodeId id, bool isHardEvidence)
fired after a new evidence is inserted
virtual void onAllMarginalTargetsErased_()
fired before a all marginal targets are removed
NodeProperty< Potential< GUM_SCALAR > > _posteriors_
LoopyBeliefPropagation(const IBayesNet< GUM_SCALAR > *bn)
Default constructor.
virtual void updateOutdatedPotentials_()
prepares inference when the latter is in OutdatedPotentials state
virtual void onAllEvidenceErased_(bool contains_hard_evidence)
fired before all the evidence are erased
virtual void onMarginalTargetErased_(const NodeId id)
fired before a marginal target is removed
Potential< GUM_SCALAR > _computeProdPi_(NodeId X, NodeId except)
Potential< GUM_SCALAR > _computeProdPi_(NodeId X)
virtual const Potential< GUM_SCALAR > & posterior_(NodeId id)
asks derived classes for the posterior of a given variable
GUM_SCALAR _updateNodeMessage_(NodeId X)