ISpatialIndex.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. using System.Collections.Generic;
  2. namespace Dbscan
  3. {
  4. /// <summary>
  5. /// Provides the base interface for the abstraction of
  6. /// an index to find points.
  7. /// </summary>
  8. /// <typeparam name="T">The type of elements in the index.</typeparam>
  9. public interface ISpatialIndex<out T>
  10. {
  11. /// <summary>
  12. /// Get all of the elements within the current <see cref="T:Dbscan.ISpatialIndex`1" />.
  13. /// </summary>
  14. /// <returns>
  15. /// A list of every element contained in the <see cref="T:Dbscan.ISpatialIndex`1" />.
  16. /// </returns>
  17. IReadOnlyList<T> Search();
  18. /// <summary>
  19. /// Get all of the elements from this <see cref="T:Dbscan.ISpatialIndex`1" />
  20. /// within a circle centered at the point <see cref="P:Dbscan.IPointData.Point" />
  21. /// with a radius of <paramref name="epsilon" />.
  22. /// </summary>
  23. /// <param name="p">The center of the search circle.</param>
  24. /// <param name="epsilon">The radius of the search circle.</param>
  25. /// <returns>
  26. /// A list of the points that are within the search area.
  27. /// </returns>
  28. IReadOnlyList<T> Search(in IPointData p, double epsilon);
  29. }
  30. }