65 template <
typename GUM_ELEMENT,
66 template <
typename >
class COMBINEOPERATOR,
67 template <
typename >
class PROJECTOPERATOR,
81 const GUM_ELEMENT neutral);
153#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 manipulate context during Function Graph Operations.
Class used to perform Function Graph Operations in the FMDP Framework.
void _establishVarOrder_()
Computes an order for the final Decision graph that will minimize the number of re exploration.
HashTable< NodeId, short int * > _DG2InstantiationNeeded_
const MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > * _DG1_
One of the two function graphs used for the operation.
const gum::VariableSet * _primedVars_
The set of variables we want to keep at the end.
~Regress()
Default destructor.
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.
const DiscreteVariable * _targetVar_
The variable we work on to eleminate.
const GUM_ELEMENT _neutral_
The function to be performed on the leaves.
short int * _default_
Just a computationnal trick.
HashTable< NodeId, short int * > _DG1InstantiationNeeded_
Table uses to know if a given node of given function graph has retrograde variables.
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.
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.
Regress(const MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > *vfunction, const MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > *probDist, const gum::VariableSet *primedVars, const DiscreteVariable *targetVar, const GUM_ELEMENT neutral)
Default constructor.
const MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > * _DG2_
The other one.
const PROJECTOPERATOR< GUM_ELEMENT > _project_
const COMBINEOPERATOR< GUM_ELEMENT > _combine_
The functions to be performed on the leaves.
Idx _nbVar_
The total number of variable implied in the operation.
Size Idx
Type for indexes.
Size NodeId
Type for node ids.
gum is the global namespace for all aGrUM entities
Set< const DiscreteVariable * > VariableSet
Class used to manipulate o4DGContext in Function Graph Operations.
Class used to compute the operation between two decision diagrams.