47#ifndef GUM_LOOPYBELIEFPROPAGATION_H
48#define GUM_LOOPYBELIEFPROPAGATION_H
60 template < GUM_Numeric 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.
void onAllMarginalTargetsErased_() override
fired before a all marginal targets are removed
~LoopyBeliefPropagation() override
Destructor.
void updateOutdatedStructure_() override
prepares inference when the latter is in OutdatedStructure state
void makeInference_() override
called when the inference has to be performed effectively
ArcProperty< Tensor< GUM_SCALAR > > _messages_
void onAllEvidenceErased_(bool contains_hard_evidence) override
fired before all the evidence are erased
void onEvidenceErased_(const NodeId id, bool isHardEvidence) override
fired before an evidence is removed
void onMarginalTargetAdded_(const NodeId id) override
fired after a new marginal target is inserted
const Tensor< GUM_SCALAR > & posterior_(NodeId id) override
asks derived classes for the posterior of a given variable
GUM_SCALAR _updateNodeMessage_(NodeId X)
Tensor< GUM_SCALAR > _computeProdLambda_(NodeId X)
void onStateChanged_() override
fired when the stage is changed
Tensor< GUM_SCALAR > _computeProdLambda_(NodeId X, NodeId except)
void onEvidenceAdded_(const NodeId id, bool isHardEvidence) override
fired after a new evidence is inserted
NodeProperty< Tensor< GUM_SCALAR > > _posteriors_
Tensor< GUM_SCALAR > _computeProdPi_(NodeId X, NodeId except)
void onMarginalTargetErased_(const NodeId id) override
fired before a marginal target is removed
void updateOutdatedTensors_() override
prepares inference when the latter is in OutdatedTensors state
Tensor< GUM_SCALAR > _computeProdPi_(NodeId X)
LoopyBeliefPropagation(const IBayesNet< GUM_SCALAR > *bn)
Default constructor.
void onEvidenceChanged_(const NodeId id, bool hasChangedSoftHard) override
fired after an evidence is changed, in particular when its status (soft/hard) changes
void onModelChanged_(const GraphicalModel *bn) override
fired after a new Bayes net has been assigned to the engine
void onAllMarginalTargetsAdded_() override
fired after all the nodes of the BN are added as marginal targets
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