Interface HyperplaneSubset<P extends Point<P>>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      RegionLocation classify​(P pt)
      Classify a point with respect to the subset region.
      P closest​(P pt)
      Return the closest point to the argument that is contained in the subset (ie, not classified as outside), or null if no such point exists.
      default boolean contains​(P pt)
      Return true if the hyperplane subset contains the given point, meaning that the point lies on the hyperplane and is not on the outside of the subset region.
      P getCentroid()
      Get the centroid, or geometric center, of the hyperplane subset or null if no centroid exists or one exists but is not unique.
      Hyperplane<P> getHyperplane()
      Get the hyperplane containing this instance.
      boolean isEmpty()
      Return true if this instance does not contain any points.
      boolean isFull()
      Return true if this instance contains all points in the hyperplane.
      java.util.List<? extends HyperplaneConvexSubset<P>> toConvex()
      Convert this instance into a list of convex child subsets representing the same region.
      HyperplaneSubset<P> transform​(Transform<P> transform)
      Return a new hyperplane subset resulting from the application of the given transform.
      • Methods inherited from interface org.apache.commons.geometry.core.partitioning.Splittable

        split
    • Method Detail

      • getHyperplane

        Hyperplane<P> getHyperplane()
        Get the hyperplane containing this instance.
        Returns:
        the hyperplane containing this instance
      • isFull

        boolean isFull()
        Return true if this instance contains all points in the hyperplane.
        Returns:
        true if this instance contains all points in the hyperplane
      • isEmpty

        boolean isEmpty()
        Return true if this instance does not contain any points.
        Returns:
        true if this instance does not contain any points
      • getCentroid

        P getCentroid()
        Get the centroid, or geometric center, of the hyperplane subset or null if no centroid exists or one exists but is not unique. A centroid will not exist for empty or infinite subsets.

        The centroid of a geometric object is defined as the mean position of all points in the object, including interior points, vertices, and other points lying on the boundary. If a physical object has a uniform density, then its center of mass is the same as its geometric centroid.

        Returns:
        the centroid of the hyperplane subset or null if no unique centroid exists
        See Also:
        Centroid
      • classify

        RegionLocation classify​(P pt)
        Classify a point with respect to the subset region. The point is classified as follows:
        • INSIDE - The point lies on the hyperplane and inside of the subset region.
        • BOUNDARY - The point lies on the hyperplane and is on the boundary of the subset region.
        • OUTSIDE - The point does not lie on the hyperplane or it does lie on the hyperplane but is outside of the subset region.
        Parameters:
        pt - the point to classify
        Returns:
        classification of the point with respect to the hyperplane and subspace region
      • contains

        default boolean contains​(P pt)
        Return true if the hyperplane subset contains the given point, meaning that the point lies on the hyperplane and is not on the outside of the subset region.
        Parameters:
        pt - the point to check
        Returns:
        true if the point is contained in the hyperplane subset
      • closest

        P closest​(P pt)
        Return the closest point to the argument that is contained in the subset (ie, not classified as outside), or null if no such point exists.
        Parameters:
        pt - the reference point
        Returns:
        the closest point to the reference point that is contained in the subset, or null if no such point exists
      • transform

        HyperplaneSubset<P> transform​(Transform<P> transform)
        Return a new hyperplane subset resulting from the application of the given transform. The current instance is not modified.
        Parameters:
        transform - the transform instance to apply
        Returns:
        new transformed hyperplane subset
      • toConvex

        java.util.List<? extends HyperplaneConvexSubset<P>> toConvex()
        Convert this instance into a list of convex child subsets representing the same region. Implementations are not required to return an optimal convex subdivision of the current instance. They are free to return whatever subdivision is readily available.
        Returns:
        a list of hyperplane convex subsets representing the same subspace region as this instance