103#ifndef GUM_GRAPH_ELEMENTS_H
104#define GUM_GRAPH_ELEMENTS_H
335#ifndef DOXYGEN_SHOULD_SKIP_THIS
345 static Size castToSize(
const Edge& key);
352 Size operator()(
const Edge& key)
const final;
356 class HashFunc< Arc >:
public HashFuncBase< Arc > {
363 static Size castToSize(
const Arc& key);
370 Size operator()(
const Arc& key)
const final;
394 template <
class VAL >
396 template <
class VAL >
398 template <
class VAL >
411#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
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
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
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.
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=(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