36 #ifndef DOXYGEN_SHOULD_SKIP_THIS 54 n1(
std::min(aN1, aN2)), n2(
std::max(aN1, aN2)) {
56 GUM_CONSTRUCTOR(Edge);
61 INLINE
Edge::Edge(
const Edge& src) : n1(src.n1), n2(src.n2) {
91 GUM_ERROR(IdError,
id <<
" does not belong to this edge");
106 return ((
n1 == src.n1) && (
n2 == src.n2));
112 return ((
n1 != src.n1) || (
n2 != src.n2));
117 INLINE
Size HashFunc< Edge >::castToSize(
const Edge& key) {
123 INLINE
Size HashFunc< Edge >::operator()(
const Edge& key)
const {
124 return castToSize(key) & this->_hash_mask;
143 GUM_CONSTRUCTOR(Arc);
148 INLINE
Arc::Arc(
const Arc& src) : n1(src.n1), n2(src.n2) {
194 GUM_ERROR(IdError,
id <<
" does not belong to this arc");
209 return ((
n1 == src.n1) && (
n2 == src.n2));
215 return ((
n1 != src.n1) || (
n2 != src.n2));
228 INLINE
Size HashFunc< Arc >::castToSize(
const Arc& key) {
234 INLINE
Size HashFunc< Arc >::operator()(
const Arc& key)
const {
235 return castToSize(key) & this->_hash_mask;
NodeId second() const
returns the node ID of the other extremal node ID
void __setTail(NodeId id)
modifies the tail of the arc
static constexpr Size gold
NodeId n1
the extremal nodes of the edge (their order is unimportant)
Edge & operator=(const Edge &src)
copy operator
bool operator==(const Arc &src) const
checks whether two arcs are equal
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)
bool operator!=(const Arc &src) const
check if two arcs are different
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void operator-()
reverses the direction of the arc
NodeId head() const
returns the head of the arc
NodeId second() const
returns the node ID of the other extremal node ID
NodeId first() const
returns one extremal node ID (whichever one it is is unspecified)
Arc(NodeId tail, NodeId head)
basic constructor. Creates tail -> head.
bool operator!=(const Edge &src) const
checks whether two undirected edges are different
void __setHead(NodeId id)
modifies the head of the arc
Arc & operator=(const Arc &src)
copy operator
std::size_t Size
In aGrUM, hashed values are unsigned long int.
NodeId n1
the extremal nodes of the edge (their order is unimportant)
bool operator==(const Edge &src) const
checks whether two undirected edges are equal
NodeId first() const
returns one extremal node ID (whichever one it is is unspecified)
Size NodeId
Type for node ids.
NodeId tail() const
returns the tail of the arc
#define GUM_ERROR(type, msg)
NodeId other(NodeId id) const
returns an extremal node of an edge given the ID of the other one
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.