![]() |
aGrUM
0.20.3
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) More... | |
Edge (const Edge &src) | |
copy constructor More... | |
~Edge () | |
destructor More... | |
Accessors | |
NodeId | other (NodeId id) const |
returns an extremal node of an edge given the ID of the other one More... | |
NodeId | first () const |
returns one extremal node ID (whichever one it is is unspecified) More... | |
NodeId | second () const |
returns the node ID of the other extremal node ID More... | |
Operators | |
Edge & | operator= (const Edge &src) |
copy operator More... | |
bool | operator== (const Edge &src) const |
checks whether two undirected edges are equal More... | |
bool | operator!= (const Edge &src) const |
checks whether two undirected edges are different More... | |
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 144 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 |
gum::Edge::Edge | ( | const Edge & | src | ) |
copy constructor
gum::Edge::~Edge | ( | ) |
destructor
NodeId gum::Edge::first | ( | ) | const |
returns one extremal node ID (whichever one it is is unspecified)
checks whether two undirected edges are different
Two Edge are different if at least one extremal node of an edge is not an extremal node of the other edge. For instance, (4,5) != (5,6).
checks whether two undirected edges are equal
Two Edge are equal if they have the same extremal nodes, whetever their order. For instance (3,4) == (4,3).
returns an extremal node of an edge given the ID of the other one
NodeId gum::Edge::second | ( | ) | const |
returns the node ID of the other extremal node ID
|
private |
the extremal nodes of the edge (their order is unimportant)
Definition at line 202 of file graphElements.h.
|
private |
Definition at line 202 of file graphElements.h.