20 #ifndef GUM_EDGE_GRAPH_PART_H 21 #define GUM_EDGE_GRAPH_PART_H 88 bool edges_resize_policy =
true);
191 template <
typename VAL >
202 template <
typename VAL >
208 template <
typename VAL >
217 const NodeId node2)
const;
239 #ifndef GUM_NO_INLINE 241 #endif // GUM_NOINLINE 245 #endif // GUM_EDGEGRAPHPART_H 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
EdgeSetIterator EdgeIterator
bool operator==(const EdgeGraphPart &p) const
tests whether two EdgeGraphParts contain the same edges
EdgeGraphPart & operator=(const EdgeGraphPart &s)
copy operator
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
static constexpr Size default_size
The default number of slots in hashtables.
Classes for undirected edge sets.
Generic doubly linked lists.
gum is the global namespace for all aGrUM entities
Inline implementation of classes for undirected edge sets.
The class for generic Hash Tables.
const NodeSet & neighbours(const NodeId id) const
returns the set of edges adjacent to a given node
EdgeProperty< VAL > edgesProperty(VAL(*f)(const Edge &), Size size=0) const
a method to create a hashMap of VAL from a set of edges (using for every edge, say x...
void __checkNeighbours(const NodeId id) const
when the EdgeGraphPart contains no edge adjacent to a given node, this function adds an empty set ent...
virtual void clearEdges()
removes all the edges from the EdgeGraphPart
const EdgeSet & edges() const
returns the set of edges stored within the EdgeGraphPart
std::ostream & operator<<(std::ostream &output, const BayesNet< GUM_SCALAR > &bn)
Prints map's DAG in output using the Graphviz-dot format.
List< VAL > listMapEdges(VAL(*f)(const Edge &)) const
a method to create a list of VAL from a set of edges (using for every edge, say x, the VAL f(x))
bool existsEdge(const Edge &edge) const
indicates whether a given edge exists
virtual ~EdgeGraphPart()
destructor
Signaler2< NodeId, NodeId > onEdgeDeleted
Unsafe iterators for the Set class.
const std::string toString() const
to friendly display the content of the EdgeGraphPart
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
Implementation of the EdgeGraphPart.
void eraseNeighbours(const NodeId id)
erase all the edges adjacent to a given node
Size NodeId
Type for node ids.
some utils for topology : NodeId, Edge, Arc and consorts ...
EdgeSet __edges
the set of all the edges contained within the EdgeGraphPart