57#define ALLOCATE(x) SmallObjectAllocator::instance().allocate(x)
58#define DEALLOCATE(x, y) SmallObjectAllocator::instance().deallocate(x, y)
62 template <
typename GUM_ELEMENT,
63 template <
typename >
class COMBINEOPERATOR,
64 template <
typename >
class PROJECTOPERATOR,
65 template <
typename >
class TerminalNodePolicy >
74 template <
typename GUM_ELEMENT,
75 template <
typename >
class COMBINEOPERATOR,
76 template <
typename >
class PROJECTOPERATOR,
77 template <
typename >
class TerminalNodePolicy >
84 template <
typename GUM_ELEMENT,
85 template <
typename >
class COMBINEOPERATOR,
86 template <
typename >
class PROJECTOPERATOR,
87 template <
typename >
class TerminalNodePolicy >
98 template <
typename GUM_ELEMENT,
99 template <
typename >
class COMBINEOPERATOR,
100 template <
typename >
class PROJECTOPERATOR,
101 template <
typename >
class TerminalNodePolicy >
107 std::vector< MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy >* > varbucket;
109 for (
Idx moda = 0; moda < currentNode->
nodeVar()->domainSize(); ++moda) {
112 if (
_vFunc_->isTerminalNode(currentNode->
son(moda))) {
113 GUM_ELEMENT value =
_vFunc_->nodeValue(currentNode->
son(moda));
116 vpxi->manager()->setRootNode(vpxi->manager()->addTerminalNode(value));
122 if (vpxi !=
nullptr) {
126 varbucket.push_back(combinope.
compute());
132 if (varbucket.empty())
return nullptr;
135 varbucket.pop_back();
136 while (!varbucket.empty()) {
141 temp = varbucket.back();
142 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_ELEMENT > &src)
Removes all variables in this MultiDimContainer and copy the content of src, variables included.
static MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > * getTreeInstance()
Returns an arborescent instance.
Class used to perform Decision Tree Operation in the FMDP Framework.
MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > * compute()
Computes and builds the Function Graph that is the result of the operation.
MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > * _xPloreVFunc_(NodeId currentNodeId)
The whatever 1.
~TreeRegress()
Default destructor.
HashTable< const DiscreteVariable *, Idx > _context_
TreeRegress(const MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > *qAction, const Bijection< const DiscreteVariable *, const MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > * > pxi)
Default constructor.
MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > * compute()
Computes and builds the Function Graph that is the result of the operation.
const MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > * _vFunc_
The function graphs used for the operation.
const Bijection< const DiscreteVariable *, const MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy > * > _pxi_
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.