aGrUM  0.16.0
barrenNodesFinder.h
Go to the documentation of this file.
1 
29 #ifndef GUM_BARREN_NODES_FINDER_H
30 #define GUM_BARREN_NODES_FINDER_H
31 
32 
33 #include <agrum/BN/BayesNet.h>
34 #include <agrum/agrum.h>
35 #include <agrum/graphs/DAG.h>
37 
38 
39 namespace gum {
40 
41 
48  public:
49  // ############################################################################
51  // ############################################################################
53 
55  explicit BarrenNodesFinder(const DAG* dag);
56 
59 
61  BarrenNodesFinder(BarrenNodesFinder&& from) noexcept;
62 
65 
67 
68 
69  // ############################################################################
71  // ############################################################################
73 
76 
79 
81 
82 
83  // ############################################################################
85  // ############################################################################
87 
89  void setDAG(const DAG* new_dag);
90 
92  void setEvidence(const NodeSet* observed_nodes);
93 
95  void setTargets(const NodeSet* target_nodes);
96 
99 
101  ArcProperty< NodeSet > barrenNodes(const CliqueGraph& junction_tree);
102 
104  template < typename GUM_SCALAR >
106  barrenPotentials(const CliqueGraph& junction_tree,
107  const IBayesNet< GUM_SCALAR >& bn);
108 
110 
111  private:
113  const DAG* __dag;
114 
117 
120  };
121 
122 
123 } /* namespace gum */
124 
125 
126 #ifndef GUM_NO_INLINE
128 #endif // GUM_NO_INLINE
129 
130 
132 
133 
134 #endif /* GUM_BARREN_NODES_FINDER_H */
const NodeSet * __observed_nodes
the set of observed nodes
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
The class for generic Hash Tables.
Definition: hashTable.h:679
BarrenNodesFinder & operator=(const BarrenNodesFinder &from)
copy operator
NodeSet barrenNodes()
returns the set of barren nodes
Basic graph of cliques.
Definition: cliqueGraph.h:58
const DAG * __dag
the DAG on which we compute the barren nodes
BarrenNodesFinder(const DAG *dag)
default constructor
void setTargets(const NodeSet *target_nodes)
sets the set of target nodes we are interested in
const NodeSet * __target_nodes
the set of targeted nodes
void setEvidence(const NodeSet *observed_nodes)
sets the observed nodes in the DAG
Detect barren nodes for inference in Bayesian networks.
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.
void setDAG(const DAG *new_dag)
sets a new DAG
ArcProperty< Set< const Potential< GUM_SCALAR > *> > barrenPotentials(const CliqueGraph &junction_tree, const IBayesNet< GUM_SCALAR > &bn)
returns the set of barren potentials in messages sent in a junction tree