35 #define ALLOCATE(x) SmallObjectAllocator::instance().allocate(x) 36 #define DEALLOCATE(x, y) SmallObjectAllocator::instance().deallocate(x, y) 40 template <
typename GUM_SCALAR,
42 class COMBINEOPERATOR,
44 class PROJECTOPERATOR,
46 class TerminalNodePolicy >
58 template <
typename GUM_SCALAR,
60 class COMBINEOPERATOR,
62 class PROJECTOPERATOR,
64 class TerminalNodePolicy >
72 template <
typename GUM_SCALAR,
74 class COMBINEOPERATOR,
76 class PROJECTOPERATOR,
78 class TerminalNodePolicy >
87 TerminalNodePolicy >::getTreeInstance();
95 template <
typename GUM_SCALAR,
97 class COMBINEOPERATOR,
99 class PROJECTOPERATOR,
100 template <
typename >
101 class TerminalNodePolicy >
109 std::vector< MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >* >
115 if (
__vFunc->isTerminalNode(currentNode->
son(moda))) {
116 GUM_SCALAR value =
__vFunc->nodeValue(currentNode->
son(moda));
119 TerminalNodePolicy >::getTreeInstance();
120 vpxi->manager()->setRootNode(vpxi->manager()->addTerminalNode(value));
126 if (vpxi !=
nullptr) {
129 varbucket.push_back(combinope.
compute());
135 if (varbucket.empty())
return nullptr;
138 varbucket.pop_back();
139 while (!varbucket.empty()) {
142 vp = projope.compute();
144 temp = varbucket.back();
145 varbucket.pop_back();
Class used to perform Decision Tree Regression in the FMDP Framework.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
const DiscreteVariable * nodeVar() const
Returns the node variable.
NodeId son(Idx modality) const
Returns the son at a given index.
TreeRegress(const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > *qAction, const Bijection< const DiscreteVariable *, const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * > pxi)
Default constructor.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Base class for discrete random variable.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Class used to perform Decision Tree Operation in the FMDP Framework.
~TreeRegress()
Default destructor.
const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * __vFunc
The function graphs used for the operation.
virtual Size domainSize() const =0
MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * compute()
Computes and builds the Function Graph that is the result of the operation.
Structure used to represent a node internal structure.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * compute()
Computes and builds the Function Graph that is the result of the operation.
Set of pairs of elements with fast search for both elements.
Class implementingting a function graph.
const Bijection< const DiscreteVariable *, const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > *> __pxi
Size Idx
Type for indexes.
HashTable< const DiscreteVariable *, Idx > __context
MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * __xPloreVFunc(NodeId currentNodeId)
The whatever 1.
Size NodeId
Type for node ids.