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.
|
| GBruteForceNeighborFinder (GMatrix *pData, GDistanceMetric *pMetric=NULL, bool ownMetric=false) |
|
virtual | ~GBruteForceNeighborFinder () |
|
virtual size_t | findNearest (size_t k, size_t index) |
| See the comment for GNeighborFinder::findNearest. More...
|
|
virtual size_t | findNearest (size_t k, const GVec &vector) |
| See the comment for GNeighborFinderGeneralizing::neighbors. More...
|
|
virtual size_t | findWithinRadius (double squaredRadius, size_t index) |
| See the comment for GNeighborFinder::findWithinRadius. More...
|
|
virtual size_t | findWithinRadius (double squaredRadius, const GVec &vector) |
| See the comment for GNeighborFinderGeneralizing::findWithinRadius. More...
|
|
virtual void | reoptimize () |
| This is a no-op method in this class. More...
|
|
| GNeighborFinderGeneralizing (const GMatrix *pData, 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...
|
|
virtual double | distance (size_t i) |
| See the comment for GNeighborFinder::distance. More...
|
|
GDistanceMetric * | metric () |
| Returns the metric. More...
|
|
virtual size_t | neighbor (size_t i) |
| See the comment for GNeighborFinder::neighbor. More...
|
|
void | sortNeighbors (size_t start=0, size_t end=INVALID_INDEX) |
| Uses Quick Sort to sort the neighbors from least to most distant. More...
|
|
| GNeighborFinder (const GMatrix *pData) |
|
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...
|
|