public abstract class KdTree<T> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
KdTree.Entry<T>
Stores a distance and value to output
|
static class |
KdTree.Manhattan<T>
Class for tree with Manhattan distancing
|
static class |
KdTree.SqrEuclid<T>
Class for tree with Unweighted Squared Euclidean distancing
|
static class |
KdTree.WeightedManhattan<T>
Class for tree with Weighted Manhattan distancing
|
static class |
KdTree.WeightedSqrEuclid<T>
Class for tree with Weighted Squared Euclidean distancing
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(double[] location,
T value)
Add a point and associated value to the tree
|
protected double |
getAxisWeightHint(int i) |
List<KdTree.Entry<T>> |
nearestNeighbor(double[] location,
int count,
boolean sequentialSorting)
Calculates the nearest 'count' points to 'location'
|
protected abstract double |
pointDist(double[] p1,
double[] p2) |
protected abstract double |
pointRegionDist(double[] point,
double[] min,
double[] max) |
int |
size()
Get the number of points in the tree
|
public int size()
public void addPoint(double[] location, T value)
public List<KdTree.Entry<T>> nearestNeighbor(double[] location, int count, boolean sequentialSorting)
protected abstract double pointDist(double[] p1, double[] p2)
protected abstract double pointRegionDist(double[] point, double[] min, double[] max)
protected double getAxisWeightHint(int i)
Copyright © 2015. All rights reserved.