47#ifndef GUM_LOOPYBELIEFPROPAGATION_H
48#define GUM_LOOPYBELIEFPROPAGATION_H
60 template <
typename GUM_SCALAR >
121#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
122# ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
126#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
127# ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
This file contains general methods for approximate inference.
ApproximateInference(const IBayesNet< GUM_SCALAR > *bn)
Virtual base class for probabilistic graphical models.
Class representing the minimal interface for Bayesian network with no numerical data.
ArcProperty< Tensor< GUM_SCALAR > > _messages_
virtual void onModelChanged_(const GraphicalModel *bn)
fired after a new Bayes net has been assigned to the engine
virtual void onAllEvidenceErased_(bool contains_hard_evidence)
fired before all the evidence are erased
virtual void onMarginalTargetAdded_(const NodeId id)
fired after a new marginal target is inserted
virtual void onEvidenceErased_(const NodeId id, bool isHardEvidence)
fired before an evidence is removed
virtual void onMarginalTargetErased_(const NodeId id)
fired before a marginal target is removed
GUM_SCALAR _updateNodeMessage_(NodeId X)
virtual void onStateChanged_()
fired when the stage is changed
Tensor< GUM_SCALAR > _computeProdLambda_(NodeId X)
virtual void updateOutdatedTensors_()
prepares inference when the latter is in OutdatedTensors state
virtual ~LoopyBeliefPropagation()
Destructor.
virtual void onAllMarginalTargetsAdded_()
fired after all the nodes of the BN are added as marginal targets
Tensor< GUM_SCALAR > _computeProdLambda_(NodeId X, NodeId except)
virtual void onAllMarginalTargetsErased_()
fired before a all marginal targets are removed
NodeProperty< Tensor< GUM_SCALAR > > _posteriors_
virtual const Tensor< GUM_SCALAR > & posterior_(NodeId id)
asks derived classes for the posterior of a given variable
Tensor< GUM_SCALAR > _computeProdPi_(NodeId X, NodeId except)
virtual void onEvidenceChanged_(const NodeId id, bool hasChangedSoftHard)
fired after an evidence is changed, in particular when its status (soft/hard) changes
Tensor< GUM_SCALAR > _computeProdPi_(NodeId X)
LoopyBeliefPropagation(const IBayesNet< GUM_SCALAR > *bn)
Default constructor.
virtual void updateOutdatedStructure_()
prepares inference when the latter is in OutdatedStructure state
virtual void onEvidenceAdded_(const NodeId id, bool isHardEvidence)
fired after a new evidence is inserted
virtual void makeInference_()
called when the inference has to be performed effectively
Size NodeId
Type for node ids.
HashTable< Arc, VAL > ArcProperty
Property on graph elements.
HashTable< NodeId, VAL > NodeProperty
Property on graph elements.
Implementation of Loopy Belief Propagation in Bayesian networks.
gum is the global namespace for all aGrUM entities