aGrUM  0.13.2
barrenNodesFinder_inl.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Christophe GONZALES et Pierre-Henri WUILLEMIN *
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  ***************************************************************************/
20 
21 namespace gum {
22 
23 
25  INLINE BarrenNodesFinder::BarrenNodesFinder(const DAG* dag) : __dag(dag) {
26  // for debugging purposes
27  GUM_CONSTRUCTOR(BarrenNodesFinder);
28  }
29 
30 
35  // for debugging purposes
36  GUM_CONS_CPY(BarrenNodesFinder);
37  }
38 
39 
44  // for debugging purposes
45  GUM_CONS_MOV(BarrenNodesFinder);
46  }
47 
48 
51  // for debugging purposes
52  GUM_DESTRUCTOR(BarrenNodesFinder);
53  }
54 
55 
59  if (this != &from) {
60  __dag = from.__dag;
63  }
64  return *this;
65  }
66 
67 
71  if (this != &from) {
72  __dag = from.__dag;
73  __observed_nodes = from.__observed_nodes;
74  __target_nodes = from.__target_nodes;
75  }
76  return *this;
77  }
78 
79 
81  INLINE void BarrenNodesFinder::setDAG(const DAG* new_dag) { __dag = new_dag; }
82 
83 
85  INLINE void BarrenNodesFinder::setEvidence(const NodeSet* observed_nodes) {
86  __observed_nodes = observed_nodes;
87  }
88 
89 
91  INLINE void BarrenNodesFinder::setTargets(const NodeSet* target_nodes) {
92  __target_nodes = target_nodes;
93  }
94 
95 
96 } /* namespace gum */
const NodeSet * __observed_nodes
the set of observed nodes
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
BarrenNodesFinder & operator=(const BarrenNodesFinder &from)
copy operator
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.
Base class for dag.
Definition: DAG.h:98
void setDAG(const DAG *new_dag)
sets a new DAG