51#ifndef GUM_MULTI_DIM_FUNCTION_GRAPH_OPERATOR_H
52#define GUM_MULTI_DIM_FUNCTION_GRAPH_OPERATOR_H
70 template <
typename GUM_SCALAR,
71 template <
typename >
class FUNCTOR,
165#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
Base class for discrete random variable.
Implementation of a Terminal Node Policy that maps nodeid directly to value.
The class for generic Hash Tables.
Class used to perform Function Graph Operations.
Idx _nbVar_
The total number of variable implied in the operation.
~MultiDimFunctionGraphOperator()
Default destructor.
Idx _distance_(const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > *, const DiscreteVariable *, const DiscreteVariable *)
Heuristic methods to decide which of two retrograde variables should come first.
const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * _DG2_
The other one.
HashTable< double, NodeId > _explorationTable_
The hashtable used to know if two pair of nodes have already been visited.
void _establishVarOrder_()
Computes an order for the final Decision graph that will minimize the number of re exploration.
MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * _rd_
The resulting function graph.
const FUNCTOR< GUM_SCALAR > _function_
The function to be performed on the leaves.
MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * compute()
Computes and builds the Function Graph that is the result of the operation.
HashTable< NodeId, short int * > _DG2InstantiationNeeded_
Table uses to know if a given node of second function graph has retrograde vrariables.
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.
MultiDimFunctionGraphOperator(const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > *DG1, const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > *DG2)
Default constructor.
HashTable< NodeId, short int * > _DG1InstantiationNeeded_
Table uses to know if a given node of first function graph has retrograde vrariables.
NodeId _compute_(O4DGContext ¤tSituation, Idx lastInstVarPos)
The main recursion function.
const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * _DG1_
One of the two function graphs used for the operation.
short int * _default_
Just a comptuationnal trick.
Class used to manipulate context during Function Graph Operations.
Size Idx
Type for indexes.
Size NodeId
Type for node ids.
Class used to compute the operation between two decision diagrams.
gum is the global namespace for all aGrUM entities
Class used to manipulate o4DGContext in Function Graph Operations.