Class SpatialQueryArrayLegacy<E>

java.lang.Object
org.stianloader.stianknn.SpatialQueryArrayLegacy<E>
All Implemented Interfaces:
SpatialIndex1NN<E>, SpatialIndexIterable<E>, SpatialIndexKNN<E>, SpatialRingIndex1NN<E>

@Deprecated public class SpatialQueryArrayLegacy<E> extends Object implements SpatialRingIndex1NN<E>, SpatialIndexIterable<E>
Deprecated.
  • Constructor Details

    • SpatialQueryArrayLegacy

      public SpatialQueryArrayLegacy(@NotNull @NotNull Collection<@NotNull PointObjectPair<E>> points)
      Deprecated.
  • Method Details

    • createIterator

      public Iterator<@NotNull E> createIterator(float x, float y)
      Deprecated.
      Description copied from interface: SpatialIndexIterable
      Create an iterator that fetches the element close to the point defined by the parameters x and y. The iterator will return the elements closest to the point first, then return the elements further away from the point.

      Note that the iterator may be inefficient when fetching large amounts of points, though it concretely depends on the implementation.

      Specified by:
      createIterator in interface SpatialIndexIterable<E>
      Parameters:
      x - The x component of the position of the point which will be the origin for the proximity evaluations.
      y - The y component of the position of the point which will be the origin for the proximity evaluations.
      Returns:
      An iterator that iterates over the elements based on the proximity from the given point.
    • query1nn

      @Nullable public E query1nn(float x, float y, float minDistSq, float maxDistSq)
      Deprecated.
      Specified by:
      query1nn in interface SpatialRingIndex1NN<E>
    • queryKnn

      @NotNull @Deprecated public @NotNull Iterator<@NotNull E> queryKnn(float x, float y)
      Deprecated.
    • queryKnn

      public void queryKnn(float x, float y, int nearestNeighbours, Consumer<E> out)
      Deprecated.
      Specified by:
      queryKnn in interface SpatialIndexKNN<E>