56#define ALLOCATE(x) SmallObjectAllocator::instance().allocate(x)
57#define DEALLOCATE(x, y) SmallObjectAllocator::instance().deallocate(x, y)
61 template <
typename GUM_SCALAR,
62 template <
typename >
class COMBINEOPERATOR,
63 template <
typename >
class PROJECTOPERATOR,
64 template <
typename >
class TerminalNodePolicy >
73 template <
typename GUM_SCALAR,
74 template <
typename >
class COMBINEOPERATOR,
75 template <
typename >
class PROJECTOPERATOR,
76 template <
typename >
class TerminalNodePolicy >
83 template <
typename GUM_SCALAR,
84 template <
typename >
class COMBINEOPERATOR,
85 template <
typename >
class PROJECTOPERATOR,
86 template <
typename >
class TerminalNodePolicy >
97 template <
typename GUM_SCALAR,
98 template <
typename >
class COMBINEOPERATOR,
99 template <
typename >
class PROJECTOPERATOR,
100 template <
typename >
class TerminalNodePolicy >
106 std::vector< MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >* > varbucket;
108 for (
Idx moda = 0; moda < currentNode->
nodeVar()->domainSize(); ++moda) {
111 if (
_vFunc_->isTerminalNode(currentNode->
son(moda))) {
112 GUM_SCALAR value =
_vFunc_->nodeValue(currentNode->
son(moda));
115 vpxi->manager()->setRootNode(vpxi->manager()->addTerminalNode(value));
121 if (vpxi !=
nullptr) {
125 varbucket.push_back(combinope.
compute());
131 if (varbucket.empty())
return nullptr;
134 varbucket.pop_back();
135 while (!varbucket.empty()) {
140 temp = varbucket.back();
141 varbucket.pop_back();
Set of pairs of elements with fast search for both elements.
Base class for discrete random variable.
Structure used to represent a node internal structure.
const DiscreteVariable * nodeVar() const
Returns the node variable.
NodeId son(Idx modality) const
Returns the son at a given index.
virtual void copy(const MultiDimContainer< GUM_SCALAR > &src)
Removes all variables in this MultiDimContainer and copy the content of src, variables included.
static MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * getTreeInstance()
Returns an arborescent instance.
Class used to perform Decision Tree Operation in the FMDP Framework.
MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * compute()
Computes and builds the Function Graph that is the result of the operation.
MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * _xPloreVFunc_(NodeId currentNodeId)
The whatever 1.
~TreeRegress()
Default destructor.
TreeRegress(const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > *qAction, const Bijection< const DiscreteVariable *, const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * > pxi)
Default constructor.
const Bijection< const DiscreteVariable *, const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * > _pxi_
MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * compute()
Computes and builds the Function Graph that is the result of the operation.
HashTable< const DiscreteVariable *, Idx > _context_
const MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > * _vFunc_
The function graphs used for the operation.
Size Idx
Type for indexes.
Size NodeId
Type for node ids.
Headers of the InternalNode class.
gum is the global namespace for all aGrUM entities
Class used to compute the operation between two decision diagrams.
Class used to compute the operation between two decision diagrams.