aGrUM  0.14.2
treeOperator.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  ****************************************************************************/
28 #ifndef GUM_TREE_OPERATOR_H
29 #define GUM_TREE_OPERATOR_H
30 
31 #include <functional>
32 
35 
36 namespace gum {
37 
45  template < typename GUM_SCALAR,
46  template < typename >
47  class COMBINEOPERATOR,
48  template < typename > class TerminalNodePolicy =
49  ExactTerminalNodePolicy >
50  class TreeOperator {
51  public:
52  // ============================================================================
54  // ============================================================================
56 
63 
71 
75  ~TreeOperator();
76 
78  // ============================================================================
80  // ============================================================================
82 
86 
88 
89  private:
91  NodeId __xPloreDT1(NodeId currentNodeId);
92 
94  NodeId __xPloreDT2(NodeId currentNodeId);
95 
97 
101 
104 
106  const COMBINEOPERATOR< GUM_SCALAR > __combine;
107 
110  };
111 
112 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
113  extern template class TreeOperator< double, std::plus >;
114 #endif
115 
116 } // namespace gum
117 
119 
120 #endif // GUM_OPERATOR_H
Class used to compute the operation between two decision diagrams.
Headers of the ExactTerminalNodePolicy.
NodeId __checkRedundancy(const DiscreteVariable *, NodeId *)
Base class for discrete random variable.
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
Class used to perform Decision Tree Operation in the FMDP Framework.
Definition: treeOperator.h:50
HashTable< const DiscreteVariable *, Idx > __context
Definition: treeOperator.h:108
NodeId __xPloreDT2(NodeId currentNodeId)
The main recursion function.
The class for generic Hash Tables.
Definition: hashTable.h:676
NodeId __xPloreDT1(NodeId currentNodeId)
The main recursion function.
const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * __dt1
The two function graphs used for the operation.
Definition: treeOperator.h:99
MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * compute()
Computes and builds the Function Graph that is the result of the operation.
Class implementingting a function graph.
const COMBINEOPERATOR< GUM_SCALAR > __combine
The function to be performed on the leaves.
Definition: treeOperator.h:106
Headers of MultiDimFunctionGraph.
~TreeOperator()
Default destructor.
MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * __rd
The resulting function graph.
Definition: treeOperator.h:103
TreeOperator(const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > *dt1, const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > *dt2)
Default constructor.
const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * __dt2
Definition: treeOperator.h:100
Size NodeId
Type for node ids.
Definition: graphElements.h:97