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,
61 Regress(
const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >* vfunction,
62 const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >* probDist,
63 const Set<
const DiscreteVariable* >* primedVars,
64 const DiscreteVariable* targetVar,
65 const GUM_SCALAR neutral);
94 HashTable< NodeId,
short int* >& dgInstNeed);
137 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 143 #include <agrum/tools/multidim/utils/FunctionGraphUtilities/operators/regress_tpl.h> const Set< const DiscreteVariable *> * _primedVars_
The set of variables we want to keep at the end.
INLINE void emplace(Args &&... args)
const PROJECTOPERATOR< GUM_SCALAR > _project_
MultiDimFunctionGraph< GUM_SCALAR, 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.
HashTable< NodeId, short int *> _DG1InstantiationNeeded_
Table uses to know if a given node of given function graph has retrograde variables.
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.
MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * _rd_
The resulting function graph.
const COMBINEOPERATOR< GUM_SCALAR > _combine_
The functions to be performed on the leaves.
HashTable< double, NodeId > _explorationTable_
The hashtable used to know if two pair of nodes have already been visited.
short int * _default_
Just a computationnal trick.
Class used to perform Function Graph Operations in the FMDP Framework.
Idx _nbVar_
The total number of variable implied in the operation.
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.
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 DiscreteVariable * _targetVar_
The variable we work on to eleminate.
HashTable< NodeId, short int *> _DG2InstantiationNeeded_
const GUM_SCALAR _neutral_
The function to be performed on the leaves.
~Regress()
Default destructor.
void _establishVarOrder_()
Computes an order for the final Decision graph that will minimize the number of re exploration...