32 #define ALLOCATE(x) SmallObjectAllocator::instance().allocate(x) 33 #define DEALLOCATE(x, y) SmallObjectAllocator::instance().deallocate(x, y) 37 template <
typename GUM_SCALAR,
39 class COMBINEOPERATOR,
41 class PROJECTOPERATOR,
43 class TerminalNodePolicy >
55 template <
typename GUM_SCALAR,
57 class COMBINEOPERATOR,
59 class PROJECTOPERATOR,
61 class TerminalNodePolicy >
69 template <
typename GUM_SCALAR,
71 class COMBINEOPERATOR,
73 class PROJECTOPERATOR,
75 class TerminalNodePolicy >
84 TerminalNodePolicy >::getTreeInstance();
92 template <
typename GUM_SCALAR,
94 class COMBINEOPERATOR,
96 class PROJECTOPERATOR,
98 class TerminalNodePolicy >
106 std::vector< MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >* >
112 if (
__vFunc->isTerminalNode(currentNode->
son(moda))) {
113 GUM_SCALAR value =
__vFunc->nodeValue(currentNode->
son(moda));
116 TerminalNodePolicy >::getTreeInstance();
117 vpxi->manager()->setRootNode(vpxi->manager()->addTerminalNode(value));
123 if (vpxi !=
nullptr) {
126 varbucket.push_back(combinope.
compute());
132 if (varbucket.empty())
return nullptr;
135 varbucket.pop_back();
136 while (!varbucket.empty()) {
139 vp = projope.compute();
141 temp = varbucket.back();
142 varbucket.pop_back();
Class used to perform Decision Tree Regression in the FMDP Framework.
Class used to compute the operation between two decision diagrams.
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.
Headers of the InternalNode class.
Base class for discrete random variable.
gum is the global namespace for all aGrUM entities
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.
Class used to compute the operation between two decision diagrams.
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.