23 #ifndef GUM_EDGE_GRAPH_PART_H 24 #define GUM_EDGE_GRAPH_PART_H 91 bool edges_resize_policy =
true);
194 template <
typename VAL >
205 template <
typename VAL >
211 template <
typename VAL >
220 const NodeId node2)
const;
242 #ifndef GUM_NO_INLINE 244 #endif // GUM_NOINLINE 248 #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.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
The class for generic Hash Tables.
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
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
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void eraseNeighbours(const NodeId id)
erase all the edges adjacent to a given node
Size NodeId
Type for node ids.
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