53#define ALLOCATE(x) SmallObjectAllocator::instance().allocate(x)
54#define DEALLOCATE(x, y) SmallObjectAllocator::instance().deallocate(x, y)
Base class for discrete random variable.
virtual Size domainSize() const =0
InternalNode()
Default Constructor Creates an empty node with no variable attached.
void setNodeVar(const DiscreteVariable *v)
Set the node variable.
void setNode(const DiscreteVariable *v, NodeId *sons)
Allows you to respecify the node, changing its attached variable as well as its son map.
void _setNodeVar_(const DiscreteVariable *v)
Set the node variable.
NodeId * _nodeSons_
Table of sons of the node.
const DiscreteVariable * _nodeVar_
Variable associated to such node.
void addParent(NodeId parent, Idx modality)
Adds a parent.
~InternalNode()
Class destructors.
static NodeId * allocateNodeSons(const DiscreteVariable *v)
Allocates a table of nodeid of the size given in parameter.
static void deallocateNodeSons(const DiscreteVariable *v, NodeId *s)
Deallocates a NodeSons table.
void removeParent(NodeId parent, Idx modality)
Removes a parent.
LinkedList< Parent > _nodeParents_
The list of the node's parent.
Size Idx
Type for indexes.
Size NodeId
Type for node ids.
Headers of the InternalNode class.
Inline implementation of the InternalNode class.
gum is the global namespace for all aGrUM entities
Represent a node's parent.