org.ddogleg.nn.alg
Interface KdTreeSearch1
-
- All Known Implementing Classes:
- KdTreeSearch1Bbf, KdTreeSearch1Standard
public interface KdTreeSearch1Interface for searching a single tree for the nearest-neighbor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description KdTree.NodefindNeighbor(double[] target)Searches for the nearest neighbor to the target.doublegetDistance()Returns the distance of the closest node.voidsetMaxDistance(double maxDistance)Specifies the maximum distance a closest-point needs to be to be consideredvoidsetTree(KdTree tree)Specifies the tree which is to be searched
-
-
-
Method Detail
-
setTree
void setTree(KdTree tree)
Specifies the tree which is to be searched
-
setMaxDistance
void setMaxDistance(double maxDistance)
Specifies the maximum distance a closest-point needs to be to be considered- Parameters:
maxDistance- maximum distance from target
-
findNeighbor
KdTree.Node findNeighbor(double[] target)
Searches for the nearest neighbor to the target. If no point is found that is less than maxDistance then return null.- Parameters:
target- Point whose nearest neighbor is being searched for- Returns:
- The closest point or null if there is none.
-
getDistance
double getDistance()
Returns the distance of the closest node.- Returns:
- distance to closest node.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG