Package org.stianloader.stianknn
Class SpatialQueryArray<E>
java.lang.Object
org.stianloader.stianknn.SpatialQueryArray<E>
- Type Parameters:
E-
- All Implemented Interfaces:
SpatialIndex1NN<E>,SpatialIndexKNN<E>
Code heavily based on a gist made by someone else.
-
Constructor Summary
ConstructorsConstructorDescriptionSpatialQueryArray(Collection<PointObjectPair<@NotNull E>> points, float minX, float minY, float maxX, float maxY, float cellWidth, float cellHeight) -
Method Summary
-
Constructor Details
-
SpatialQueryArray
public SpatialQueryArray(Collection<PointObjectPair<@NotNull E>> points, float minX, float minY, float maxX, float maxY, float cellWidth, float cellHeight)
-
-
Method Details
-
query1nn
- Specified by:
query1nnin interfaceSpatialIndex1NN<E>
-
queryKnn
public void queryKnn(float x, float y, int nearestNeighbours, @NotNull @NotNull Consumer<@NotNull E> out) - Specified by:
queryKnnin interfaceSpatialIndexKNN<E>
-