46 const NodeId second)
const {
55 Edge edge(first, second);
87 for (
auto iter =
set.beginSafe(); iter !=
set.endSafe();
100 for (
auto iter =
set.beginSafe(); iter !=
set.endSafe();
bool contains(const Key &k) const
Indicates whether a given elements belong to the set.
NodeId second() const
returns the node ID of the other extremal node ID
bool operator==(const EdgeGraphPart &p) const
tests whether two EdgeGraphParts contain the same edges
bool empty() const noexcept
Indicates whether the set is the empty set.
bool emptyEdges() const
indicates wether the EdgeGraphPart contains any edge
virtual void addEdge(const NodeId n1, const NodeId n2)
insert a new edge into the EdgeGraphPart
NodeProperty< NodeSet *> __neighbours
for each node, the set of its adjacent edges
void erase(const Key &k)
Erases an element from the set.
Classes for undirected edge sets.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
const NodeSet & neighbours(const NodeId id) const
returns the set of edges adjacent to a given node
void __checkNeighbours(const NodeId id) const
when the EdgeGraphPart contains no edge adjacent to a given node, this function adds an empty set ent...
const EdgeSet & edges() const
returns the set of edges stored within the EdgeGraphPart
NodeId first() const
returns one extremal node ID (whichever one it is is unspecified)
#define GUM_EMIT2(signal, arg1, arg2)
bool existsEdge(const Edge &edge) const
indicates whether a given edge exists
Signaler2< NodeId, NodeId > onEdgeDeleted
bool operator!=(const EdgeGraphPart &p) const
tests whether two EdgeGraphParts contain different edges
The base class for all undirected edges.
Size sizeEdges() const
indicates the number of edges stored within the EdgeGraphPart
void unvirtualizedEraseNeighbours(const NodeId id)
same function as eraseNeighbours but without any virtual call to an erase
std::size_t Size
In aGrUM, hashed values are unsigned long int.
virtual void eraseEdge(const Edge &edge)
removes an edge from the EdgeGraphPart
Signaler2< NodeId, NodeId > onEdgeAdded
Size size() const noexcept
Returns the number of elements in the set.
void eraseNeighbours(const NodeId id)
erase all the edges adjacent to a given node
Size NodeId
Type for node ids.
void insert(const Key &k)
Inserts a new element into the set.
EdgeSet __edges
the set of all the edges contained within the EdgeGraphPart