KdTree

verb.core.KdTree<T>

CLASS

Source code

A Haxe port of:

k-d Tree JavaScript - V 1.0

https://github.com/ubilabs/kd-tree-javascript

@author Mircea Pricop pricop@ubilabs.net, 2012 @author Martin Kleppe kleppe@ubilabs.net, 2012 @author Ubilabs http://ubilabs.net, 2012 @license MIT License http://www.opensource.org/licenses/mit-license.php

constructor

METHOD

Source code

new KdTree<T>(points : undefined, distanceFunction : undefined)

nearest

METHOD

Source code

nearest(point : Point, maxNodes : Int, maxDistance : Float) : Array<Pair<KdPoint<T>, Float>>

KdPoint

verb.core.KdPoint<T>

CLASS

Source code

A point in a KdTree

constructor

METHOD

Source code

new KdPoint<T>(point : undefined, obj : undefined)

point

PROPERTY

Source code

point : Point

The point

obj

PROPERTY

Source code

obj : T

An arbitrary object to attach

KdNode

verb.core.KdNode<T>

CLASS

Source code

A node in a KdTree

constructor

METHOD

Source code

new KdNode<T>(kdPoint : KdPoint<T>, dimension : Int, parent : KdNode<T>)

kdPoint

PROPERTY

Source code

kdPoint : KdPoint<T>

The point itself

left

PROPERTY

Source code

left : KdNode<T>

The left child

PROPERTY

Source code

right : KdNode<T>

The right child

parent

PROPERTY

Source code

parent : KdNode<T>

The parent of the node

dimension

PROPERTY

Source code

dimension : Int

The dimensionality of the point