GClasses
|
A simple neighbor-finder that reports the nearest neighbors in the sequence. (That is, the previous and next rows are the closest neighbors.) The distance is sequential distance to the neighbor (not squared). More...
#include <GNeighborFinder.h>
Public Member Functions | |
GSequenceNeighborFinder (GMatrix *pData, int neighborCount) | |
virtual | ~GSequenceNeighborFinder () |
virtual void | neighbors (size_t *pOutNeighbors, size_t index) |
Computes the neighbors of the specified vector. More... | |
virtual void | neighbors (size_t *pOutNeighbors, double *pOutDistances, size_t index) |
Computes the neighbors and distances of the specified vector. More... | |
![]() | |
GNeighborFinder (const GMatrix *pData, size_t neighborCount) | |
virtual | ~GNeighborFinder () |
virtual bool | canGeneralize () |
Returns true if this neighbor finder can operate on points that are not in the dataset passed to the constructor. More... | |
const GMatrix * | data () |
Returns the data passed to the constructor of this object. More... | |
virtual bool | isCached () |
Returns true iff the neighbors and distances are pre-computed. More... | |
size_t | neighborCount () |
Returns the number of neighbors to find. More... | |
void | sortNeighbors (size_t *pNeighbors, double *pDistances) |
Uses Quick Sort to sort the neighbors from least to most dissimilar, followed by any slots for with INVALID_INDEX for the index. (Note: This method is pointless, since the neighors are already guaranteed to come in sorted order. Todo: figure out why it is still here) More... | |
Additional Inherited Members | |
![]() | |
static void | sortNeighbors (size_t neighborCount, size_t *pNeighbors, double *pDistances) |
Uses Quick Sort to sort the neighbors from least to most dissimilar, followed by any slots for with INVALID_INDEX for the index. (Note: This method is pointless, since the neighors are already guaranteed to come in sorted order. Todo: figure out why it is still here) More... | |
![]() | |
size_t | m_neighborCount |
const GMatrix * | m_pData |
A simple neighbor-finder that reports the nearest neighbors in the sequence. (That is, the previous and next rows are the closest neighbors.) The distance is sequential distance to the neighbor (not squared).
GClasses::GSequenceNeighborFinder::GSequenceNeighborFinder | ( | GMatrix * | pData, |
int | neighborCount | ||
) |
|
virtual |
|
virtual |
Computes the neighbors of the specified vector.
Implements GClasses::GNeighborFinder.
|
virtual |
Computes the neighbors and distances of the specified vector.
Implements GClasses::GNeighborFinder.