103#ifndef GUM_GRAPH_ELEMENTS_H
104#define GUM_GRAPH_ELEMENTS_H
347#ifndef DOXYGEN_SHOULD_SKIP_THIS
357 static Size castToSize(
const Edge& key);
364 Size operator()(
const Edge& key)
const final;
368 class HashFunc< Arc >:
public HashFuncBase< Arc > {
375 static Size castToSize(
const Arc& key);
382 Size operator()(
const Arc& key)
const final;
406 template <
class VAL >
408 template <
class VAL >
410 template <
class VAL >
423#if !defined(GUM_NO_EXTERN_TEMPLATE_CLASS) && !defined(SWIG)
The base class for all directed edges.
GUM_NODISCARD NodeId second() const
returns the node ID of the other extremal node ID
void _setTail_(NodeId id)
modifies the tail of the arc
GUM_NODISCARD NodeId head() const
returns the head of the arc
NodeId n1
the extremal nodes of the edge (their order is unimportant)
Arc(const Arc &src)
copy constructor
Arc & operator=(Arc &&src) noexcept
move operator
void _setHead_(NodeId id)
modifies the head of the arc
bool operator==(const Arc &src) const =default
checks whether two arcs are equal
GUM_NODISCARD NodeId other(NodeId id) const
returns an extremal node of an edge given the ID of the other one
GUM_NODISCARD NodeId first() const
returns one extremal node ID (whichever one it is is unspecified)
Arc & operator=(const Arc &src)
copy operator
Arc(Arc &&src) noexcept
move constructor
GUM_NODISCARD NodeId tail() const
returns the tail of the arc
Arc(NodeId tail, NodeId head)
basic constructor. Creates tail -> head.
void operator-()
reverses the direction of the arc
The base class for all undirected edges.
Edge(Edge &&src) noexcept
move constructor
NodeId n1
the extremal nodes of the edge (their order is unimportant)
GUM_NODISCARD NodeId first() const
returns one extremal node ID (whichever one it is is unspecified)
Edge & operator=(Edge &&src) noexcept
move operator
Edge & operator=(const Edge &src)
copy operator
GUM_NODISCARD NodeId other(NodeId id) const
returns an extremal node of an edge given the ID of the other one
Edge(NodeId aN1, NodeId aN2)
constructs a new edge (aN1,aN2)
Edge(const Edge &src)
copy constructor
bool operator==(const Edge &src) const =default
checks whether two undirected edges are equal
GUM_NODISCARD NodeId second() const
returns the node ID of the other extremal node ID
All hash functions should inherit from this class.
This class should be useless as only its specializations should be used.
SetIterator< Arc > const_iterator
Inlined implementation of directed and undirected edges.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Set< Edge > EdgeSet
Some typdefs and define for shortcuts ...
Size NodeId
Type for node ids.
HashTable< Arc, VAL > ArcProperty
Property on graph elements.
ArcSet::const_iterator ArcSetIterator
Some typdefs and define for shortcuts ...
HashTable< Edge, VAL > EdgeProperty
Property on graph elements.
Set< Arc > ArcSet
Some typdefs and define for shortcuts ...
const NodeSet emptyNodeSet
Some typdefs and define for shortcuts ...
EdgeSet::const_iterator EdgeSetIterator
Some typdefs and define for shortcuts ...
NodeSet::const_iterator NodeSetIterator
Some typdefs and define for shortcuts ...
HashTable< NodeId, VAL > NodeProperty
Property on graph elements.
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
gum is the global namespace for all aGrUM entities
std::ostream & operator<<(std::ostream &stream, const AVLTree< Val, Cmp > &tree)
display the content of a tree