Class BoundaryProjection<S extends Space>

  • Type Parameters:
    S - Type of the space.

    public class BoundaryProjection<S extends Space>
    extends java.lang.Object
    Class holding the result of point projection on region boundary.

    This class is a simple placeholder, it does not provide any processing methods.

    Instances of this class are guaranteed to be immutable

    Since:
    3.3
    See Also:
    AbstractRegion.projectToBoundary(Point)
    • Constructor Summary

      Constructors 
      Constructor Description
      BoundaryProjection​(Point<S> original, Point<S> projected, double offset)
      Constructor from raw elements.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getOffset()
      Offset of the point with respect to the boundary it is projected on.
      Point<S> getOriginal()
      Get the original point.
      Point<S> getProjected()
      Projected point.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BoundaryProjection

        public BoundaryProjection​(Point<S> original,
                                  Point<S> projected,
                                  double offset)
        Constructor from raw elements.
        Parameters:
        original - original point
        projected - projected point
        offset - offset of the point with respect to the boundary it is projected on
    • Method Detail

      • getOriginal

        public Point<S> getOriginal()
        Get the original point.
        Returns:
        original point
      • getProjected

        public Point<S> getProjected()
        Projected point.
        Returns:
        projected point, or null if there are no boundary
      • getOffset

        public double getOffset()
        Offset of the point with respect to the boundary it is projected on.

        The offset with respect to the boundary is negative if the original point is inside the region, and positive otherwise.

        If there are no boundary, the value is set to either Double.POSITIVE_INFINITY if the region is empty (i.e. all points are outside of the region) or Double.NEGATIVE_INFINITY if the region covers the whole space (i.e. all points are inside of the region).

        Returns:
        offset of the point with respect to the boundary it is projected on