File: NearestNeighbor.rst

package info (click to toggle)
ddogleg 0.22%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,208 kB
  • sloc: java: 36,432; makefile: 168; python: 52
file content (13 lines) | stat: -rw-r--r-- 520 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
Nearest Neighbor
#######################

A nearest neighbor searches for all the neighbors of a point inside of a set which minimizes a distance metric.  In DDogleg the only distance metric available is Euclidean distance squares, which is the same as minimizing Euclidean distance, but faster.

:gitexample:`ExampleNearestNeighbor.java`

.. literalinclude:: ../../examples/src/org/ddogleg/example/ExampleNearestNeighbor.java
   :language: java
   :linenos:
   :start-after: public class
   :tab-width: 4
   :dedent: 4