34 #include <agrum/tools/multidim/implementations/multiDimFunctionGraph.h> 35 #include <agrum/tools/multidim/utils/FunctionGraphUtilities/operators/o4DGContext.h> 36 #include <agrum/tools/multidim/utils/FunctionGraphUtilities/terminalNodePolicies/ExactTerminalNodePolicy.h> 47 template <
typename GUM_SCALAR,
49 class COMBINEOPERATOR,
51 class PROJECTOPERATOR,
52 template <
typename >
class TerminalNodePolicy
63 const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >* vfunction,
64 const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >* probDist,
65 const Set<
const DiscreteVariable* >* primedVars,
66 const DiscreteVariable* targetVar,
67 const GUM_SCALAR neutral);
95 const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >* dg,
96 HashTable< NodeId,
short int* >& dgInstNeed);
139 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 145 #include <agrum/tools/multidim/utils/FunctionGraphUtilities/operators/regress_tpl.h> Idx nbVar__
The total number of variable implied in the operation.
MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * rd__
The resulting function graph.
NodeId compute__(O4DGContext ¤tSituation, Idx lastInstVarPos)
The main recursion function.
INLINE void emplace(Args &&... args)
MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * compute()
Computes and builds the Function Graph that is the result of the operation.
HashTable< NodeId, short int *> DG2InstantiationNeeded__
const Set< const DiscreteVariable *> * primedVars__
The set of variables we want to keep at the end.
HashTable< double, NodeId > explorationTable__
The hashtable used to know if two pair of nodes have already been visited.
Regress(const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > *vfunction, const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > *probDist, const Set< const DiscreteVariable * > *primedVars, const DiscreteVariable *targetVar, const GUM_SCALAR neutral)
Default constructor.
const DiscreteVariable * targetVar__
The variable we work on to eleminate.
void establishVarOrder__()
Computes an order for the final Decision graph that will minimize the number of re exploration...
const PROJECTOPERATOR< GUM_SCALAR > project__
const GUM_SCALAR neutral__
The function to be performed on the leaves.
const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * DG1__
One of the two function graphs used for the operation.
Class used to perform Function Graph Operations in the FMDP Framework.
short int * default__
Just a computationnal trick.
void findRetrogradeVariables__(const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > *dg, HashTable< NodeId, short int * > &dgInstNeed)
Establish for each node in both function graph if it has retrograde variables beneath it...
const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * DG2__
The other one.
HashTable< NodeId, short int *> DG1InstantiationNeeded__
Table uses to know if a given node of given function graph has retrograde variables.
const COMBINEOPERATOR< GUM_SCALAR > combine__
The functions to be performed on the leaves.
~Regress()
Default destructor.