![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
The base class for all undirected edges. More...
#include <graphElements.h>
Public Member Functions | |
Constructors / Destructors | |
| Edge (NodeId aN1, NodeId aN2) | |
| constructs a new edge (aN1,aN2) | |
| Edge (const Edge &src) | |
| copy constructor | |
| ~Edge () | |
| destructor | |
Accessors | |
| GUM_NODISCARD NodeId | other (NodeId id) const |
| returns an extremal node of an edge given the ID of the other one | |
| GUM_NODISCARD NodeId | first () const |
| returns one extremal node ID (whichever one it is is unspecified) | |
| GUM_NODISCARD NodeId | second () const |
| returns the node ID of the other extremal node ID | |
Operators | |
| Edge & | operator= (const Edge &src) |
| copy operator | |
| bool | operator== (const Edge &src) const =default |
| checks whether two undirected edges are equal | |
Private Attributes | |
| NodeId | n1 |
| the extremal nodes of the edge (their order is unimportant) | |
| NodeId | n2 |
The base class for all undirected edges.
This class is used as a basis for manipulating any undirected edge in any graph. By undirected edge, we mean a symmetric edge, i.e., an edge in which the order of the nodes is unimportant. For instance, in Markov Random fields, 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 undirected edge and, in aGrUM, by an Edge.
Definition at line 164 of file graphElements.h.
constructs a new edge (aN1,aN2)
| aN1 | the ID of the first extremal node |
| aN2 | the ID of the second extremal node |
Referenced by Edge(), operator=(), and operator==().
| gum::Edge::Edge | ( | const Edge & | src | ) |
| gum::Edge::~Edge | ( | ) |
destructor
| GUM_NODISCARD NodeId gum::Edge::first | ( | ) | const |
returns one extremal node ID (whichever one it is is unspecified)
References GUM_NODISCARD.
Referenced by gum::SpanningForestPrim::_computeInAComponent_(), and gum::EdgeGraphPart::eraseEdge().
| GUM_NODISCARD NodeId gum::Edge::other | ( | NodeId | id | ) | const |
returns an extremal node of an edge given the ID of the other one
References GUM_NODISCARD.
| GUM_NODISCARD NodeId gum::Edge::second | ( | ) | const |
returns the node ID of the other extremal node ID
References GUM_NODISCARD.
Referenced by gum::SpanningForestPrim::_computeInAComponent_(), and gum::EdgeGraphPart::eraseEdge().
|
private |
the extremal nodes of the edge (their order is unimportant)
Definition at line 217 of file graphElements.h.
|
private |
Definition at line 218 of file graphElements.h.