PointInfo.cs 931 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. namespace Dbscan
  2. {
  3. /// <summary>
  4. /// A holding class for algorithm related information about a point.
  5. /// </summary>
  6. /// <typeparam name="T">The type of the element this object is holding.</typeparam>
  7. public class PointInfo<T> : IPointData where T : IPointData
  8. {
  9. /// <summary>
  10. /// The object being held by this holder
  11. /// </summary>
  12. public T Item { get; }
  13. /// <summary>
  14. /// Whether or not this point has been clustered
  15. /// </summary>
  16. public bool Clustered { get; set; }
  17. /// <summary>
  18. /// Whether or not this point has been visited
  19. /// </summary>
  20. public bool Visited { get; set; }
  21. /// <summary>
  22. /// The location of this point
  23. /// </summary>
  24. public Point Point => Item.Point;
  25. /// <summary>
  26. /// Initializes a new <see cref="T:Dbscan.PointInfo`1" /> with the object it is holding.
  27. /// </summary>
  28. /// <param name="item"></param>
  29. public PointInfo(T item)
  30. {
  31. Item = item;
  32. }
  33. }
  34. }