mlpack
Public Member Functions | List of all members
mlpack::emst::EdgePair Class Reference

An edge pair is simply two indices and a distance. More...

#include <edge_pair.hpp>

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...
 
size_t Lesser () const
 Get the lesser index.
 
size_t & Lesser ()
 Modify the lesser index.
 
size_t Greater () const
 Get the greater index.
 
size_t & Greater ()
 Modify the greater index.
 
double Distance () const
 Get the distance.
 
double & Distance ()
 Modify the distance.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ EdgePair()

mlpack::emst::EdgePair::EdgePair ( const size_t  lesser,
const size_t  greater,
const double  dist 
)
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.


The documentation for this class was generated from the following file: