Finds neighbors by measuring the distance to all points. This one should work properly even if the distance metric does not support the triangle inequality.
More...
|
| GBruteForceNeighborFinder (GMatrix *pData, size_t neighborCount, GDistanceMetric *pMetric=NULL, bool ownMetric=false) |
|
virtual | ~GBruteForceNeighborFinder () |
|
virtual void | neighbors (size_t *pOutNeighbors, size_t index) |
| See the comment for GNeighborFinder::neighbors. More...
|
|
virtual void | neighbors (size_t *pOutNeighbors, double *pOutDistances, size_t index) |
| See the comment for GNeighborFinder::neighbors. More...
|
|
virtual void | neighbors (size_t *pOutNeighbors, double *pOutDistances, const double *pInputVector) |
| See the comment for GNeighborFinderGeneralizing::neighbors. More...
|
|
virtual void | reoptimize () |
| This is a no-op method in this class. More...
|
|
| GNeighborFinderGeneralizing (const GMatrix *pData, size_t neighborCount, GDistanceMetric *pMetric=NULL, bool ownMetric=false) |
| Create a neighborfinder for finding the neighborCount nearest neighbors under the given metric. If ownMetric is true, then the neighborFinder takes responsibility for deleting the metric, otherwise it is the caller's responsibility. More...
|
|
virtual | ~GNeighborFinderGeneralizing () |
|
virtual bool | canGeneralize () |
| Returns true. See the comment for GNeighborFinder::canGeneralize. More...
|
|
| GNeighborFinder (const GMatrix *pData, size_t neighborCount) |
|
virtual | ~GNeighborFinder () |
|
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...
|
|
Finds neighbors by measuring the distance to all points. This one should work properly even if the distance metric does not support the triangle inequality.