MCPcopy Create free account
hub / github.com/creatale/node-dv / KDNearestNeighborSearch

Function KDNearestNeighborSearch

deps/tesseract/classify/kdtree.cpp:321–326  ·  view source on GitHub ↗

* This routine searches the K-D tree specified by Tree and * finds the QuerySize nearest neighbors of Query. All neighbors * must be within MaxDistance of Query. The data contents of * the nearest neighbors * are placed in NBuffer and their distances from Query are * placed in DBuffer. * @param Tree ptr to K-D tree to be searched * @param Query ptr to query key (point in D-space) *

Source from the content-addressed store, hash-verified

319 * - 7/13/89, DSJ, Return contents of node instead of node itself.
320 */
321void KDNearestNeighborSearch(
322 KDTREE *Tree, FLOAT32 Query[], int QuerySize, FLOAT32 MaxDistance,
323 int *NumberOfResults, void **NBuffer, FLOAT32 DBuffer[]) {
324 KDTreeSearch search(Tree, Query, QuerySize);
325 search.Search(NumberOfResults, DBuffer, NBuffer);
326}
327
328
329/*---------------------------------------------------------------------------*/

Callers 1

cluster.cppFile · 0.85

Calls 1

SearchMethod · 0.45

Tested by

no test coverage detected