30 #ifndef GUM_MULTI_DIM_FUNCTION_GRAPH_INTERNAL_NODE_H 31 #define GUM_MULTI_DIM_FUNCTION_GRAPH_INTERNAL_NODE_H 33 #include <agrum/agrum.h> 34 #include <agrum/tools/core/smallobjectallocator/smallObjectAllocator.h> 35 #include <agrum/tools/graphs/graphElements.h> 36 #include <agrum/tools/multidim/utils/FunctionGraphUtilities/link.h> 37 #include <agrum/tools/variables/discreteVariable.h> 195 void setNode(
const DiscreteVariable* v, NodeId* sons);
222 void setSon(Idx modality, NodeId son);
243 void addParent(NodeId parent, Idx modality);
281 #ifndef GUM_NO_INLINE 282 # include <agrum/tools/multidim/utils/FunctionGraphUtilities/internalNode_inl.h> void addParent(NodeId parent, Idx modality)
Adds a parent.
void setNode(const DiscreteVariable *v, NodeId *sons)
Allows you to respecify the node, changing its attached variable as well as its son map...
bool operator==(const Parent &comp) const
LinkedList< Parent > _nodeParents_
The list of the node's parent.
void removeParent(NodeId parent, Idx modality)
Removes a parent.
const DiscreteVariable * nodeVar() const
Returns the node variable.
Idx nbSons() const
Returns the number of sons.
void * operator new(size_t s)
New operator.
INLINE void emplace(Args &&... args)
static NodeId * allocateNodeSons(const DiscreteVariable *v)
Allocates a table of nodeid of the size given in parameter.
const DiscreteVariable * _nodeVar_
Variable associated to such node.
void setSon(Idx modality, NodeId son)
Sets the node's son.
NodeId son(Idx modality) const
Returns the son at a given index.
~InternalNode()
Class destructors.
Link< Parent > * parents()
Returns the list of parents.
static void deallocateNodeSons(const DiscreteVariable *v, NodeId *s)
Deallocates a NodeSons table.
void setNodeVar(const DiscreteVariable *v)
Set the node variable.
NodeId * _nodeSons_
Table of sons of the node.
bool operator!=(const Parent &comp) const
const Link< Parent > * parents() const
Returns the list of parents.
Parent & operator=(const Parent &src)
InternalNode(const DiscreteVariable *v, NodeId *sons)
Constructor.
void * operator new(size_t s)
New operator.
Parent(const Parent &src)
Copy constructor.
Structure used to represent a node internal structure.
void operator delete(void *p)
Delete operator.
Parent(NodeId pi, Idx m)
Class constructor.
void operator delete(void *p)
Delete operator.
Represent a node's parent.
void _setNodeVar_(const DiscreteVariable *v)
Set the node variable.
InternalNode(const DiscreteVariable *v)
Class constructor.
InternalNode()
Default Constructor Creates an empty node with no variable attached.