public class KdTree<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
bucketCapacity |
protected Object[] |
data |
protected int |
dimensions |
protected ags.utils.dataStructures.trees.thirdGenKD.KdNode<T> |
left |
protected double[] |
maxBound |
protected double[] |
minBound |
protected double[][] |
points |
protected ags.utils.dataStructures.trees.thirdGenKD.KdNode<T> |
right |
protected boolean |
singlePoint |
protected int |
size |
protected int |
splitDimension |
protected double |
splitValue |
Constructor and Description |
---|
KdTree(int dimensions) |
KdTree(int dimensions,
int bucketCapacity) |
Modifier and Type | Method and Description |
---|---|
void |
addLeafPoint(double[] point,
T value) |
void |
addPoint(double[] point,
T value) |
List<T> |
findInBounds(double[] minBound,
double[] maxBound) |
MaxHeap<T> |
findNearestNeighbors(double[] searchPoint,
int maxPointsReturned,
DistanceFunction distanceFunction) |
NearestNeighborIterator<T> |
getNearestNeighborIterator(double[] searchPoint,
int maxPointsReturned,
DistanceFunction distanceFunction) |
boolean |
isLeaf() |
protected static <T> void |
nearestNeighborSearchStep(MinHeap<ags.utils.dataStructures.trees.thirdGenKD.KdNode<T>> pendingPaths,
MaxHeap<T> evaluatedPoints,
int desiredPoints,
DistanceFunction distanceFunction,
double[] searchPoint) |
int |
size() |
protected int dimensions
protected int bucketCapacity
protected int size
protected double[][] points
protected Object[] data
protected ags.utils.dataStructures.trees.thirdGenKD.KdNode<T> left
protected ags.utils.dataStructures.trees.thirdGenKD.KdNode<T> right
protected int splitDimension
protected double splitValue
protected double[] minBound
protected double[] maxBound
protected boolean singlePoint
public KdTree(int dimensions)
public KdTree(int dimensions, int bucketCapacity)
public NearestNeighborIterator<T> getNearestNeighborIterator(double[] searchPoint, int maxPointsReturned, DistanceFunction distanceFunction)
public MaxHeap<T> findNearestNeighbors(double[] searchPoint, int maxPointsReturned, DistanceFunction distanceFunction)
protected static <T> void nearestNeighborSearchStep(MinHeap<ags.utils.dataStructures.trees.thirdGenKD.KdNode<T>> pendingPaths, MaxHeap<T> evaluatedPoints, int desiredPoints, DistanceFunction distanceFunction, double[] searchPoint)
public int size()
public boolean isLeaf()
public void addPoint(double[] point, T value)
public void addLeafPoint(double[] point, T value)
Copyright © 2015. All rights reserved.