33 #endif // GUM_NOINLINE 40 __edges(edges_size, edges_resize_policy) {
57 for (
const auto& edge :
__edges)
77 for (
const auto& edge : tmp)
100 for (
const auto& edge :
__edges)
112 for (
const auto edge :
__edges) {
126 const std::vector< NodeId >
138 while (!nodeFIFO.
empty()) {
139 current = nodeFIFO.
front();
143 for (
const auto new_one :
neighbours(current)) {
147 mark.
insert(new_one, current);
150 std::vector< NodeId > v;
152 for (current = n1; current != n2; current = mark[current])
153 v.push_back(current);
168 stream <<
set.toString();
bool empty() const noexcept
Returns a boolean indicating whether the chained list is empty.
const std::vector< NodeId > undirectedPath(const NodeId node1, const NodeId node2) const
returns a possible path from node1 to node2 in the edge set
EdgeGraphPart(Size edges_size=HashTableConst::default_size, bool edges_resize_policy=true)
default constructor
EdgeGraphPart & operator=(const EdgeGraphPart &s)
copy operator
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
NodeProperty< NodeSet *> __neighbours
for each node, the set of its adjacent edges
bool exists(const Key &key) const
Checks whether there exists an element with a given key in the hashtable.
Classes for undirected edge sets.
Generic doubly linked lists.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void popFront()
Removes the first element of a List, if any.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
The class for generic Hash Tables.
const NodeSet & neighbours(const NodeId id) const
returns the set of edges adjacent to a given node
Representation of a setA Set is a structure that contains arbitrary elements.
virtual void clearEdges()
removes all the edges from the EdgeGraphPart
std::ostream & operator<<(std::ostream &output, const BayesNet< GUM_SCALAR > &bn)
Prints map's DAG in output using the Graphviz-dot format.
#define GUM_EMIT2(signal, arg1, arg2)
Val & pushBack(const Val &val)
Inserts a new element (a copy) at the end of the chained list.
virtual ~EdgeGraphPart()
destructor
Signaler2< NodeId, NodeId > onEdgeDeleted
const std::string toString() const
to friendly display the content of the EdgeGraphPart
Val & front() const
Returns a reference to first element of a list, if any.
void clear()
Removes all the elements, if any, from the set.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Signaler2< NodeId, NodeId > onEdgeAdded
value_type & insert(const Key &key, const Val &val)
Adds a new element (actually a copy of this element) into the hash table.
Size NodeId
Type for node ids.
#define GUM_ERROR(type, msg)
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
EdgeSet __edges
the set of all the edges contained within the EdgeGraphPart