KDTree class

A class implementing the concept of a kd-tree. A kd-tree is a binary tree that splits the space in k dimensions. It is used to store points in k-dimensional space and efficiently answer nearest neighbor queries.

Nodes in a KDTree are implemented by KDNode.

References: Bio informatics lecture notes from CMU English Wikipedia article about kd-trees CS168: The Modern Algorithmic Toolbox Lecture #3: Similarity Metrics and kd-Trees

Constructors

KDTree.fromNode(List<Node> nodes, [bool useVariance = true])
Construct a KDTree from a list of Node instances.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

findNeighbors(Vector2 target, double radius) List<Node>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

dim → const int