![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
some utils for topology : NodeId, Edge, Arc and consorts ... More...
#include <iostream>#include <agrum/agrum.h>#include <agrum/base/core/set.h>#include <agrum/base/graphs/graphElements_inl.h>Go to the source code of this file.
Classes | |
| class | gum::Edge |
| The base class for all undirected edges. More... | |
| class | gum::Arc |
| The base class for all directed edges. More... | |
Namespaces | |
| namespace | gum |
| gum is the global namespace for all aGrUM entities | |
Typedefs | |
| using | gum::NodeId = Size |
| Type for node ids. | |
| template<class VAL> | |
| using | gum::NodeProperty = HashTable< NodeId, VAL > |
| Property on graph elements. | |
| template<class VAL> | |
| using | gum::EdgeProperty = HashTable< Edge, VAL > |
| Property on graph elements. | |
| template<class VAL> | |
| using | gum::ArcProperty = HashTable< Arc, VAL > |
| Property on graph elements. | |
Functions | |
| std::ostream & | gum::operator<< (std::ostream &stream, const Edge &edge) |
| to friendly display an edge | |
| std::ostream & | gum::operator<< (std::ostream &stream, const Arc &arc) |
| to friendly display an arc | |
| using | gum::EdgeSet = Set< Edge > |
| Some typdefs and define for shortcuts ... | |
| using | gum::NodeSet = Set< NodeId > |
| Some typdefs and define for shortcuts ... | |
| using | gum::ArcSet = Set< Arc > |
| Some typdefs and define for shortcuts ... | |
| using | gum::ArcSetIterator = ArcSet::const_iterator |
| Some typdefs and define for shortcuts ... | |
| using | gum::EdgeSetIterator = EdgeSet::const_iterator |
| Some typdefs and define for shortcuts ... | |
| using | gum::NodeSetIterator = NodeSet::const_iterator |
| Some typdefs and define for shortcuts ... | |
| const NodeSet | gum::emptyNodeSet |
| Some typdefs and define for shortcuts ... | |
some utils for topology : NodeId, Edge, Arc and consorts ...
This file provides two classes, namely Edge and Arc which represent respectively undirected and directed edges. The "directed/undirected" term may be misleading although in practice this will probably result in how these edges will be drawn. In fact, a more appropriate term would be "symmetric/asymmetric edges": an Arc is an edge in which the extremities have different status whereas in an Edge the role of the extremities is symmetric. For instance, in an arrow, one node is near the head and the other one is farther, hence these nodes have different status and swapping the nodes results in reversing the direction of the arrow. Thus, the nodes in an arrow can be thought of as asymmetric and the arrow's graphical representation contains a pointed extremity so as to account for this asymmetry. Conversely, in a Markov Random Field, an edge between two nodes, x and y, means that x and y are probabilistically dependent of one another. This being a symmetrical relation, there is no difference between edge (x,y) and edge (y,x). Thus, it can be represented by an Edge and, graphically, by an undirected edge.
Definition in file graphElements.h.