48#ifndef GUM_SHAFERSHENOY_LIMIDS_H
49#define GUM_SHAFERSHENOY_LIMIDS_H
78 template <
typename GUM_SCALAR >
137 const Tensor< GUM_SCALAR >&
posterior(
const std::string& name)
final {
161 std::pair< GUM_SCALAR, GUM_SCALAR >
meanVar(
const std::string& name)
final {
170 std::pair< GUM_SCALAR, GUM_SCALAR >
MEU() final;
231 const
Tensor< GUM_SCALAR >& proba) const;
235#include <agrum/ID/inference/ShaferShenoyLIMIDInference_tpl.h>
<agrum/ID/inference/decisionTensor.h>
The default triangulation algorithm used by aGrUM.
virtual const GraphicalModel & model() const final
Returns a constant reference over the IBayesNet referenced by this class.
Virtual base class for probabilistic graphical models.
InfluenceDiagramInference(const InfluenceDiagram< GUM_SCALAR > *infDiag)
Default constructor.
virtual const InfluenceDiagram< GUM_SCALAR > & influenceDiagram() const final
Returns a constant reference over the IBayesNet referenced by this class.
Class representing an Influence Diagram.
NodeSet nonRequisiteNodes_(NodeId d) const
Returns the set of non-requisite for node d.
NodeProperty< DecisionTensor< GUM_SCALAR > > posteriors_
void addNoForgettingAssumption(const std::vector< std::string > &names)
Default constructor.
NodeProperty< NodeId > node_to_clique_
void onEvidenceChanged_(NodeId id, bool hasChangedSoftHard) override
fired after an evidence is changed, in particular when its status (soft/hard) changes
void makeInference_() override
called when the inference has to be performed effectively
std::vector< NodeSet > reversePartialOrder_
void collectingToFollowingRoot_(PhiNodeProperty &phi, PsiArcProperty &psi, NodeId fromClique, NodeId toClique)
void onEvidenceAdded_(NodeId id, bool isHardEvidence) override
fired after a new evidence is inserted
gum::Tensor< GUM_SCALAR > optimalDecision(const std::string &decisionName) final
void onAllEvidenceErased_(bool contains_hard_evidence) override
fired before all the evidence are erased
std::vector< NodeId > solvabilityOrder_
gum::VariableSet SetOfVars
void _completingNoForgettingAssumption_()
void onStateChanged_() override
fired when the stage is changed
void _creatingPartialOrder_(const NodeSet &utilities)
EdgeProperty< SetOfVars > varsSeparator_
void _findingCliqueForEachNode_(DefaultTriangulation &triangulation)
void updateOutdatedStructure_() override
prepares inference when the latter is in OutdatedStructure state
void updateOutdatedTensors_() override
prepares inference when the latter is in OutdatedTensors state
void deciding_(PhiNodeProperty &phi, PsiArcProperty &psi, NodeId decisionNode)
void clear() override
Default constructor.
void addNoForgettingAssumption(const std::vector< NodeId > &ids)
No forgetting rule assumption.
virtual ~ShaferShenoyLIMIDInference()
Destructor.
const Tensor< GUM_SCALAR > & posterior(const std::string &name) final
NodeProperty< DecisionTensor< GUM_SCALAR > > PhiNodeProperty
std::pair< GUM_SCALAR, GUM_SCALAR > meanVar(const std::string &name) final
void collectingMessage_(PhiNodeProperty &phi, PsiArcProperty &psi, NodeId rootClique)
void _creatingJunctionTree_()
virtual const Tensor< GUM_SCALAR > & posteriorUtility(const std::string &name) final
void transmittingMessage_(PhiNodeProperty &phi, PsiArcProperty &psi, NodeId fromClique, NodeId toClique)
InfluenceDiagram< GUM_SCALAR > reducedLIMID() const
virtual const Tensor< GUM_SCALAR > & posterior(NodeId node) final
Return the posterior probability of a node.
NodeProperty< DecisionTensor< GUM_SCALAR > > unconditionalDecisions_
void onModelChanged_(const GraphicalModel *model) override
fired after a new Bayes net has been assigned to the engine
void _checkingSolvability_(const NodeSet &utilities)
void distributingMessage_(PhiNodeProperty &phi, PsiArcProperty &psi, NodeId rootClique)
void onEvidenceErased_(NodeId id, bool isHardEvidence) override
fired before an evidence is removed
virtual std::pair< GUM_SCALAR, GUM_SCALAR > meanVar(NodeId node) final
Return the pair (mean,variance) for a node.
ArcProperty< DecisionTensor< GUM_SCALAR > > PsiArcProperty
gum::Tensor< GUM_SCALAR > optimalDecision(NodeId decisionId) final
virtual const Tensor< GUM_SCALAR > & posteriorUtility(NodeId node) final
Return the posterior utility of a node.
std::vector< NodeSet > reversePartialOrder() const
bool hasNoForgettingAssumption() const
Default constructor.
ShaferShenoyLIMIDInference(const InfluenceDiagram< GUM_SCALAR > *infDiag)
Default constructor.
std::vector< NodeId > noForgettingOrder_
void binarizingMax_(const Tensor< GUM_SCALAR > &decision, const Tensor< GUM_SCALAR > &proba) const
CliqueGraph reducedJunctionTree_
void initializingInference_(PhiNodeProperty &phi, PsiArcProperty &psi)
std::pair< GUM_SCALAR, GUM_SCALAR > MEU() final
Return the pair (mean,variance) for the total utility (MEU).
DecisionTensor< double > integrating_(const PhiNodeProperty &phi, const PsiArcProperty &psi, NodeId clique, NodeId except) const
void computingPosteriors_(const PhiNodeProperty &phi, const PsiArcProperty &psi)
void transmittingFinalMessage_(PhiNodeProperty &phi, PsiArcProperty &psi, NodeId fromClique, NodeId toClique)
const JunctionTree * junctionTree() const
Default constructor.
NodeProperty< Tensor< GUM_SCALAR > > strategies_
aGrUM's Tensor is a multi-dimensional array with tensor operators.
This file contains abstract class definitions influence diagrams inference classes.
Class for computing default triangulations of graphs.
Size NodeId
Type for node ids.
HashTable< Arc, VAL > ArcProperty
Property on graph elements.
HashTable< Edge, VAL > EdgeProperty
Property on graph elements.
HashTable< NodeId, VAL > NodeProperty
Property on graph elements.
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
This file contains abstract class definitions influence diagrams inference classes.
Headers of the MultiDimBucket class.
Headers of MultiDimSparse.
gum is the global namespace for all aGrUM entities
Set< const DiscreteVariable * > VariableSet
CliqueGraph JunctionTree
a junction tree is a clique graph satisfying the running intersection property and such that no cliqu...
class for graph triangulations for which we enforce a given partial ordering on the nodes elimination...