An edge pair is simply two indices and a distance. More...
Public Member Functions | |
EdgePair (const size_t lesser, const size_t greater, const double dist) | |
Initialize an EdgePair with two indices and a distance. More... | |
double | Distance () const |
Get the distance. More... | |
double & | Distance () |
Modify the distance. More... | |
size_t | Greater () const |
Get the greater index. More... | |
size_t & | Greater () |
Modify the greater index. More... | |
size_t | Lesser () const |
Get the lesser index. More... | |
size_t & | Lesser () |
Modify the lesser index. More... | |
An edge pair is simply two indices and a distance.
It is used as the basic element of an edge list when computing a minimum spanning tree.
Definition at line 28 of file edge_pair.hpp.
|
inline |
Initialize an EdgePair with two indices and a distance.
The indices are called lesser and greater, implying that they be sorted before calling Init. However, this is not necessary for functionality; it is just a way to keep the edge list organized in other code.
Definition at line 45 of file edge_pair.hpp.
References Log::Assert().
|
inline |
Get the distance.
Definition at line 63 of file edge_pair.hpp.
|
inline |
Modify the distance.
Definition at line 65 of file edge_pair.hpp.
|
inline |
Get the greater index.
Definition at line 58 of file edge_pair.hpp.
|
inline |
Modify the greater index.
Definition at line 60 of file edge_pair.hpp.
|
inline |
Get the lesser index.
Definition at line 53 of file edge_pair.hpp.
|
inline |
Modify the lesser index.
Definition at line 55 of file edge_pair.hpp.