51#ifndef GUM_MULTI_DIM_FUNCTION_GRAPH_OPERATOR_H
52#define GUM_MULTI_DIM_FUNCTION_GRAPH_OPERATOR_H
70 template <
typename GUM_ELEMENT,
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.
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.
const MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > * _DG1_
One of the two function graphs used for the operation.
MultiDimFunctionGraphOperator(const MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > *DG1, const MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > *DG2)
Default constructor.
HashTable< NodeId, short int * > _DG1InstantiationNeeded_
Table uses to know if a given node of first function graph has retrograde vrariables.
const MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > * _DG2_
The other one.
Idx _nbVar_
The total number of variable implied in the operation.
MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > * _rd_
The resulting function graph.
HashTable< double, NodeId > _explorationTable_
The hashtable used to know if two pair of nodes have already been visited.
HashTable< NodeId, short int * > _DG2InstantiationNeeded_
Table uses to know if a given node of second function graph has retrograde vrariables.
Idx _distance_(const MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > *, const DiscreteVariable *, const DiscreteVariable *)
Heuristic methods to decide which of two retrograde variables should come first.
MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > * compute()
Computes and builds the Function Graph that is the result of the operation.
NodeId _compute_(O4DGContext ¤tSituation, Idx lastInstVarPos)
The main recursion function.
const FUNCTOR< GUM_ELEMENT > _function_
The function to be performed on the leaves.
~MultiDimFunctionGraphOperator()
Default destructor.
void _findRetrogradeVariables_(const MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > *dg, HashTable< NodeId, short int * > &dgInstNeed)
Establish for each node in both function graph if it has retrograde variables beneath it.
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.