aGrUM  0.14.2
dSeparation.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Pierre-Henri WUILLEMIN et Christophe GONZALES *
3  * {prenom.nom}_at_lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
27 #ifndef GUM_D_SEPARATION_H
28 #define GUM_D_SEPARATION_H
29 
30 
31 #include <agrum/BN/IBayesNet.h>
32 #include <agrum/agrum.h>
33 
34 
35 namespace gum {
36 
41  class dSeparation {
42  public:
43  // ############################################################################
45  // ############################################################################
47 
49  dSeparation();
50 
52  dSeparation(const dSeparation& from);
53 
55  dSeparation(dSeparation&& from);
56 
58  ~dSeparation();
59 
61 
62 
63  // ############################################################################
65  // ############################################################################
67 
69  dSeparation& operator=(const dSeparation& from);
70 
73 
75 
76 
77  // ############################################################################
79  // ############################################################################
81 
88  void requisiteNodes(const DAG& dag,
89  const NodeSet& query,
90  const NodeSet& hardEvidence,
91  const NodeSet& softEvidence,
92  NodeSet& requisite);
93 
96  template < typename GUM_SCALAR, template < typename > class TABLE >
98  const NodeSet& query,
99  const NodeSet& hardEvidence,
100  const NodeSet& softEvidence,
101  Set< const TABLE< GUM_SCALAR >* >& potentials);
102 
104  };
105 
106 
107 } /* namespace gum */
108 
109 
110 #ifndef GUM_NO_INLINE
112 #endif // GUM_NO_INLINE
113 
115 
116 
117 #endif /* GUM_D_SEPARATION_H */
d-separation analysis (as described in Koller & Friedman 2009)
~dSeparation()
destructor
the d-separation algorithm as described in Koller & Friedman (2009)
Definition: dSeparation.h:41
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 ...
Class representing Bayesian networks.
Class representing the minimal interface for Bayesian Network.
Definition: IBayesNet.h:59
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
dSeparation & operator=(const dSeparation &from)
copy operator
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: dSeparation.cpp:38
d-separation analysis (as described in Koller & Friedman 2009)
dSeparation()
default constructor
Base class for dag.
Definition: DAG.h:99