Class OrientedPoint.OrientedPointConvexSubset

    • Field Detail

      • hyperplane

        private final OrientedPoint hyperplane
        The underlying hyperplane for this instance.
    • Constructor Detail

      • OrientedPointConvexSubset

        OrientedPointConvexSubset​(OrientedPoint hyperplane)
        Simple constructor.
        Parameters:
        hyperplane - underlying hyperplane instance
    • Method Detail

      • isFull

        public boolean isFull()
        Return true if this instance contains all points in the hyperplane.

        This method always returns false.

        Specified by:
        isFull in interface HyperplaneSubset<Vector1D>
        Returns:
        true if this instance contains all points in the hyperplane
      • isEmpty

        public boolean isEmpty()
        Return true if this instance does not contain any points.

        This method always returns false.

        Specified by:
        isEmpty in interface HyperplaneSubset<Vector1D>
        Returns:
        true if this instance does not contain any points
      • isInfinite

        public boolean isInfinite()
        Return true if the size of the instance is infinite.

        This method always returns false.

        Specified by:
        isInfinite in interface Sized
        Returns:
        true if the size of the instance is infinite
      • isFinite

        public boolean isFinite()
        Return true if the size of the instance is finite.

        This method always returns true.

        Specified by:
        isFinite in interface Sized
        Returns:
        true if the size of the instance is finite
      • getSize

        public double getSize()
        Get the size of the instance.

        This method always returns 0.

        Specified by:
        getSize in interface Sized
        Returns:
        the size of the instance
      • getCentroid

        public Vector1D 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.

        This method returns the point for the defining hyperplane.

        Specified by:
        getCentroid in interface HyperplaneSubset<Vector1D>
        Returns:
        the centroid of the hyperplane subset or null if no unique centroid exists
        See Also:
        Centroid
      • classify

        public RegionLocation classify​(Vector1D point)
        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.

        This method returns RegionLocation.BOUNDARY if the point is on the hyperplane and RegionLocation.OUTSIDE otherwise.

        Specified by:
        classify in interface HyperplaneSubset<Vector1D>
        Parameters:
        point - the point to classify
        Returns:
        classification of the point with respect to the hyperplane and subspace region
      • closest

        public Vector1D closest​(Vector1D point)
        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.
        Specified by:
        closest in interface HyperplaneSubset<Vector1D>
        Parameters:
        point - the reference point
        Returns:
        the closest point to the reference point that is contained in the subset, or null if no such point exists
      • toConvex

        public java.util.List<OrientedPoint.OrientedPointConvexSubset> 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.
        Specified by:
        toConvex in interface HyperplaneSubset<Vector1D>
        Returns:
        a list of hyperplane convex subsets representing the same subspace region as this instance
      • reverse

        public OrientedPoint.OrientedPointConvexSubset reverse()
        Reverse the orientation of the hyperplane for this instance, returning the result as a new instance. The returned subset contains the same points but has a reversed orientation.
        Specified by:
        reverse in interface HyperplaneConvexSubset<Vector1D>
        Returns:
        a hyperplane convex subset representing the same region but with the opposite orientation.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object