aGrUM  0.16.0
BayesBall.h
Go to the documentation of this file.
1 
30 #ifndef GUM_BAYESBALLS_H
31 #define GUM_BAYESBALLS_H
32 
33 #include <utility>
34 
35 #include <agrum/agrum.h>
36 
37 #include <agrum/core/hashTable.h>
38 #include <agrum/core/list.h>
39 #include <agrum/core/sequence.h>
40 
41 #include <agrum/BN/IBayesNet.h>
42 
43 namespace gum {
51  class BayesBall {
52  public:
53  // ############################################################################
55  // ############################################################################
57  private:
59  BayesBall();
60 
62  ~BayesBall();
63 
65  public:
66  // ############################################################################
68  // ############################################################################
70 
77  static void requisiteNodes(const DAG& dag,
78  const NodeSet& query,
79  const NodeSet& hardEvidence,
80  const NodeSet& softEvidence,
81  NodeSet& requisite);
82 
85  template < typename GUM_SCALAR, template < typename > class TABLE >
86  static void relevantPotentials(const IBayesNet< GUM_SCALAR >& bn,
87  const NodeSet& query,
88  const NodeSet& hardEvidence,
89  const NodeSet& softEvidence,
90  Set< const TABLE< GUM_SCALAR >* >& potentials);
91 
93  };
94 
95 } /* namespace gum */
96 
97 #ifndef GUM_NO_INLINE
99 #endif // GUM_NO_INLINE
100 
102 
103 #endif /* GUM_BAYESBALLS_H */
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
BayesBall()
Default constructor.
Definition: BayesBall_inl.h:34
static void relevantPotentials(const IBayesNet< GUM_SCALAR > &bn, const NodeSet &query, const NodeSet &hardEvidence, const NodeSet &softEvidence, Set< const TABLE< GUM_SCALAR > * > &potentials)
update a set of potentials, keeping only those d-connected with query variables given evidence ...
Definition: BayesBall_tpl.h:35
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Class representing the minimal interface for Bayesian Network.
Definition: IBayesNet.h:62
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
Implementation of Shachter&#39;s Bayes Balls algorithm.
Definition: BayesBall.h:51
~BayesBall()
Destructor.
Definition: BayesBall_inl.h:37
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Base class for dag.
Definition: DAG.h:102
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
static void requisiteNodes(const DAG &dag, const NodeSet &query, const NodeSet &hardEvidence, const NodeSet &softEvidence, NodeSet &requisite)
Fill the &#39;requisite&#39; nodeset with the requisite nodes in dag given a query and evidence.
Definition: BayesBall.cpp:36