GClasses
|
Used for creating an array of nodes sorted by nearness to a source node.
#include <GSelfOrganizingMap.h>
Public Member Functions | |
NodeAndDistance (std::size_t nodeIndex, double dist) | |
Create a NodeAndDistance object with the given index and distance. More... | |
bool | operator< (const NodeAndDistance &rhs) const |
Return true if this node has a smaller distance than rhs, or on equal distance compares their indices, breaking ties. More... | |
Public Attributes | |
double | distance |
The distance to the node from another point. More... | |
std::size_t | nodeIdx |
The index of the node to which this object gives the distance. I don't use a pointer in case the node array gets copied or reallocated. More... | |
|
inline |
Create a NodeAndDistance object with the given index and distance.
|
inline |
Return true if this node has a smaller distance than rhs, or on equal distance compares their indices, breaking ties.
double GClasses::SOM::NodeAndDistance::distance |
The distance to the node from another point.
std::size_t GClasses::SOM::NodeAndDistance::nodeIdx |
The index of the node to which this object gives the distance. I don't use a pointer in case the node array gets copied or reallocated.