31 #ifndef GUM_MULTI_DIM_FUNCTION_GRAPH_OPERATOR_H 32 #define GUM_MULTI_DIM_FUNCTION_GRAPH_OPERATOR_H 36 #include <agrum/tools/multidim/implementations/multiDimFunctionGraph.h> 37 #include <agrum/tools/multidim/utils/FunctionGraphUtilities/operators/o4DGContext.h> 38 #include <agrum/tools/multidim/utils/FunctionGraphUtilities/terminalNodePolicies/ExactTerminalNodePolicy.h> 51 template <
typename GUM_SCALAR,
54 template <
typename >
class TerminalNodePolicy
67 const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >* DG1,
68 const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >* DG2);
111 const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >* dg,
112 HashTable< NodeId,
short int* >& dgInstNeed);
148 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 154 #include <agrum/tools/multidim/utils/FunctionGraphUtilities/operators/multiDimFunctionGraphOperator_tpl.h> 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 FUNCTOR< GUM_SCALAR > function__
The function to be performed on the leaves.
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 *> DG1InstantiationNeeded__
Table uses to know if a given node of first function graph has retrograde vrariables.
HashTable< double, NodeId > explorationTable__
The hashtable used to know if two pair of nodes have already been visited.
short int * default__
Just a comptuationnal trick.
void establishVarOrder__()
Computes an order for the final Decision graph that will minimize the number of re exploration...
Idx nbVar__
The total number of variable implied in the operation.
MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * rd__
The resulting function graph.
const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * DG1__
One of the two function graphs used for the operation.
const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * DG2__
The other one.
Class used to perform Function Graph Operations.
Idx distance__(const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > *, const DiscreteVariable *, const DiscreteVariable *)
Heuristic methods to decide which of two retrograde variables should come first.
HashTable< NodeId, short int *> DG2InstantiationNeeded__
Table uses to know if a given node of second function graph has retrograde vrariables.
MultiDimFunctionGraphOperator(const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > *DG1, const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > *DG2)
Default constructor.
~MultiDimFunctionGraphOperator()
Default destructor.
NodeId compute__(O4DGContext ¤tSituation, Idx lastInstVarPos)
The main recursion function.