30 #ifndef GUM_MULTI_DIM_FUNCTION_GRAPH_LINK_H 31 #define GUM_MULTI_DIM_FUNCTION_GRAPH_LINK_H 34 #include <agrum/agrum.h> 36 #include <agrum/tools/core/smallobjectallocator/smallObjectAllocator.h> 50 template <
typename T >
61 explicit Link(
const T& elem);
66 Link(
const T& elem,
Link< T >* nextLink);
133 template <
typename T >
199 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 200 extern template class Link<
Idx >;
205 #include <agrum/tools/multidim/utils/FunctionGraphUtilities/link_tpl.h> T _element_
The element embedded in this link.
Link< T > * list()
Returns the first link in the chained list.
Link< T > * _firstLink_
The first link of our list.
Link< T > * _nextLink_
The next link in the list.
INLINE void emplace(Args &&... args)
void clear()
Clears the list.
T & element()
Returns the element stored in this link.
void searchAndRemoveLink(const T &elem)
Removes a element from the list.
void operator delete(void *p)
Operator delete overload to use the SmallObjectAllocator.
const T & element() const
Returns the element stored in this link.
Link(const T &elem)
Constructor.
void * operator new(size_t s)
Operator new overload to use the SmallObjectAllocator.
void setNextLink(Link< T > *newLink)
Sets the next link.
Link of a chain list allocated using the SmallObjectAllocator.
Chain list allocated using the SmallObjectAllocator.
Link< T > * nextLink()
Returns next link.
void * operator new(size_t s)
Operator new overload to use the SmallObjectAllocator.
const Link< T > * list() const
Returns the first link in the chained list.
void operator delete(void *p)
Operator delete overload to use the SmallObjectAllocator.
Link(const T &elem, Link< T > *nextLink)
Constructor that insert link before the given link.
const Link< T > * nextLink() const
Returns next link.
void addLink(const T &elem)
Adds a link.