GClasses
|
Used for creating an array of nodes sorted by nearness to a source node. More...
#include <GSelfOrganizingMap.h>
Public Member Functions | |
NodeAndDistance (std::size_t nodeIdx, double distance) | |
Create a NodeAndDistance object with the given index and distance. | |
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. | |
Public Attributes | |
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. | |
double | distance |
The distance to the node from another point. |
Used for creating an array of nodes sorted by nearness to a source node.
GClasses::SOM::NodeAndDistance::NodeAndDistance | ( | std::size_t | nodeIdx, |
double | distance | ||
) | [inline] |
Create a NodeAndDistance object with the given index and distance.
bool GClasses::SOM::NodeAndDistance::operator< | ( | const NodeAndDistance & | rhs | ) | const [inline] |
Return true if this node has a smaller distance than rhs, or on equal distance compares their indices, breaking ties.
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.