50#ifndef GUM_MULTI_DIM_FUNCTION_GRAPH_INTERNAL_NODE_H
51#define GUM_MULTI_DIM_FUNCTION_GRAPH_INTERNAL_NODE_H
93 void*
operator new(
size_t s);
98 void operator delete(
void* p);
197 void*
operator new(
size_t s);
202 void operator delete(
void* p);
Base class for discrete random variable.
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.
const DiscreteVariable * nodeVar() const
Returns the node variable.
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.
Idx nbSons() const
Returns the number of sons.
~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.
NodeId son(Idx modality) const
Returns the son at a given index.
void removeParent(NodeId parent, Idx modality)
Removes a parent.
Link< Parent > * parents()
Returns the list of parents.
void setSon(Idx modality, NodeId son)
Sets the node's son.
LinkedList< Parent > _nodeParents_
The list of the node's parent.
Link of a chain list allocated using the SmallObjectAllocator.
Chain list allocated using the SmallObjectAllocator.
Base class for discrete random variable.
some utils for topology : NodeId, Edge, Arc and consorts ...
Size Idx
Type for indexes.
Size NodeId
Type for node ids.
Inline implementation of the InternalNode class.
Headers of the Link and LinkedList classes.
gum is the global namespace for all aGrUM entities
bool operator==(const Parent &comp) const
bool operator!=(const Parent &comp) const
Parent & operator=(const Parent &src)
Parent(NodeId pi, Idx m)
Class constructor.