aGrUM  0.14.2
treeOperatorStrategy.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Christophe GONZALES and 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  ***************************************************************************/
27 // =========================================================================
28 #ifndef GUM_TreeOperatorStrategy_H
29 #define GUM_TreeOperatorStrategy_H
30 // =========================================================================
32 // =========================================================================
33 
34 namespace gum {
35 
46  template < typename GUM_SCALAR >
47  class TreeOperatorStrategy : public IOperatorStrategy< GUM_SCALAR > {
48  // ###################################################################
50  // ###################################################################
52  public:
53  // ==========================================================================
55  // ==========================================================================
57 
58  // ==========================================================================
60  // ==========================================================================
62 
64 
65 
66  // ###################################################################
68  // ###################################################################
70  public:
74  }
78  SetTerminalNodePolicy >::getTreeInstance();
79  }
83  SetTerminalNodePolicy >::getTreeInstance();
84  }
85 
87 
88  // ###################################################################
90  // ###################################################################
92 
93  protected:
94  // ==========================================================================
97  // ==========================================================================
100  Idx actionId,
101  const FMDP< GUM_SCALAR >* fmdp,
102  const Set< const DiscreteVariable* >& elVarSeq);
103 
104  // ==========================================================================
106  // ==========================================================================
110  Idx del = 3);
111 
112  // ==========================================================================
114  // ==========================================================================
118  Idx del = 3);
119 
120  // ==========================================================================
122  // ==========================================================================
126  Idx del = 3);
127 
128  // ==========================================================================
130  // ==========================================================================
134  SetTerminalNodePolicy >* f1,
136  SetTerminalNodePolicy >* f2,
137  Idx del = 3);
138 
139  // ==========================================================================
141  // ==========================================================================
145  Idx del = 1);
146 
147  // ==========================================================================
149  // ==========================================================================
153  Idx del = 0);
154 
155 
157  };
158 } /* namespace gum */
159 
160 
162 
163 #endif // GUM_TreeOperatorStrategy_H
virtual MultiDimFunctionGraph< GUM_SCALAR > * minimize(const MultiDimFunctionGraph< GUM_SCALAR > *f1, const MultiDimFunctionGraph< GUM_SCALAR > *f2, Idx del=3)
~TreeOperatorStrategy()
Default destructor.
virtual MultiDimFunctionGraph< GUM_SCALAR > * add(const MultiDimFunctionGraph< GUM_SCALAR > *f1, const MultiDimFunctionGraph< GUM_SCALAR > *f2, Idx del=1)
Adds reward to given function( whether a f2 or f1)
A class to store the optimal actions.
Definition: actionSet.h:85
Headers of the Operator Strategy interface.
<agrum/FMDP/SDyna/IOperatorStrategy.h>
This class is used to implement factored decision process.
Definition: fmdp.h:54
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
Class to handle efficiently argMaxSet.
Definition: argMaxSet.h:55
Representation of a setA Set is a structure that contains arbitrary elements.
Definition: set.h:162
MultiDimFunctionGraph< GUM_SCALAR > * regress(const MultiDimFunctionGraph< GUM_SCALAR > *Vold, Idx actionId, const FMDP< GUM_SCALAR > *fmdp, const Set< const DiscreteVariable * > &elVarSeq)
Computes Qaction for given actionid.
MultiDimFunctionGraph< ActionSet, SetTerminalNodePolicy > * getAggregatorInstance()
<agrum/FMDP/planning/treeOperatorStrategy.h>
virtual MultiDimFunctionGraph< ArgMaxSet< GUM_SCALAR, Idx >, SetTerminalNodePolicy > * argmaximize(const MultiDimFunctionGraph< ArgMaxSet< GUM_SCALAR, Idx >, SetTerminalNodePolicy > *f1, const MultiDimFunctionGraph< ArgMaxSet< GUM_SCALAR, Idx >, SetTerminalNodePolicy > *f2, Idx del=3)
ArgMaximizes between f2 and f1.
MultiDimFunctionGraph< ArgMaxSet< GUM_SCALAR, Idx >, SetTerminalNodePolicy > * getArgMaxFunctionInstance()
virtual MultiDimFunctionGraph< GUM_SCALAR > * multiply(const MultiDimFunctionGraph< GUM_SCALAR > *f1, const MultiDimFunctionGraph< GUM_SCALAR > *f2, Idx del=3)
Implementation of a Terminal Node Policy that maps nodeid to a set of value.
Template implementation of FMDP/planning/TreeOperatorStrategy.h classes.
TreeOperatorStrategy()
Default constructor.
virtual MultiDimFunctionGraph< GUM_SCALAR > * subtract(const MultiDimFunctionGraph< GUM_SCALAR > *f1, const MultiDimFunctionGraph< GUM_SCALAR > *f2, Idx del=0)
Subtract current f1 from old f1 to see if threshold is reached or not.
static MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * getTreeInstance()
Returns an arborescent instance.
virtual MultiDimFunctionGraph< GUM_SCALAR > * maximize(const MultiDimFunctionGraph< GUM_SCALAR > *f1, const MultiDimFunctionGraph< GUM_SCALAR > *f2, Idx del=3)
Size Idx
Type for indexes.
Definition: types.h:50
MultiDimFunctionGraph< GUM_SCALAR, ExactTerminalNodePolicy > * getFunctionInstance()