Class GreatCircleSubset
java.lang.Object
org.apache.commons.geometry.spherical.twod.GreatCircleSubset
- All Implemented Interfaces:
Embedding<Point2S,Point1S>, HyperplaneSubset<Point2S>, Splittable<Point2S, HyperplaneSubset<Point2S>>, RegionEmbedding<Point2S, Point1S>, Sized
- Direct Known Subclasses:
EmbeddedTreeGreatCircleSubset, GreatArc
public abstract class GreatCircleSubset
extends Object
implements HyperplaneSubset<Point2S>, RegionEmbedding<Point2S,Point1S>
Class representing a subset of the points in a great circle.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final GreatCircleThe great circle defining this instance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClassify a point with respect to the subset region.Return the closest point to the argument that is contained in the subset (ie, not classified asoutside), or null if no such point exists.Get the centroid, or geometric center, of the hyperplane subset or null if no centroid exists or one exists but is not unique.Get the great circle defining this instance.Get the hyperplane containing this instance.org.apache.commons.numbers.core.Precision.DoubleEquivalenceReturn the object used to perform floating point comparisons, which is the same object used by the underlyingGreatCircle.doublegetSize()Get the size of the instance.abstract HyperplaneBoundedRegion<Point1S> Get the embedded subspace region.booleanisEmpty()Return true if this instance does not contain any points.booleanisFull()Return true if this instance contains all points in the hyperplane.toConvex()Convert this instance into a list of convex child subsets representing the same region.Transform a subspace point into a space point.toSubspace(Point2S pt) Transform a space point into a subspace point.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Embedding
toSpace, toSubspaceMethods inherited from interface HyperplaneSubset
contains, transformMethods inherited from interface Sized
isFinite, isInfiniteMethods inherited from interface Splittable
split
-
Field Details
-
circle
The great circle defining this instance.
-
-
Constructor Details
-
GreatCircleSubset
GreatCircleSubset(GreatCircle circle) Simple constructor.- Parameters:
circle- great circle defining this instance
-
-
Method Details
-
getCircle
Get the great circle defining this instance.- Returns:
- the great circle defining this instance
- See Also:
-
getHyperplane
Get the hyperplane containing this instance.- Specified by:
getHyperplanein interfaceHyperplaneSubset<Point2S>- Returns:
- the hyperplane containing this instance
-
toSubspace
-
toSpace
-
isFull
public boolean isFull()Return true if this instance contains all points in the hyperplane.- Specified by:
isFullin interfaceHyperplaneSubset<Point2S>- 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.- Specified by:
isEmptyin interfaceHyperplaneSubset<Point2S>- Returns:
- true if this instance does not contain any points
-
getSize
-
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.
- Specified by:
getCentroidin interfaceHyperplaneSubset<Point2S>- Returns:
- the centroid of the hyperplane subset or null if no unique centroid exists
- See Also:
-
classify
Classify a point with respect to the subset region. The point is classified as follows:- Specified by:
classifyin interfaceHyperplaneSubset<Point2S>- Parameters:
pt- the point to classify- Returns:
- classification of the point with respect to the hyperplane and subspace region
-
closest
Return the closest point to the argument that is contained in the subset (ie, not classified asoutside), or null if no such point exists.- Specified by:
closestin interfaceHyperplaneSubset<Point2S>- 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
-
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:
toConvexin interfaceHyperplaneSubset<Point2S>- Returns:
- a list of hyperplane convex subsets representing the same subspace region as this instance
-
getSubspaceRegion
Get the embedded subspace region.- Specified by:
getSubspaceRegionin interfaceRegionEmbedding<Point2S,Point1S> - Returns:
- the embedded subspace region
-
getPrecision
public org.apache.commons.numbers.core.Precision.DoubleEquivalence getPrecision()Return the object used to perform floating point comparisons, which is the same object used by the underlyingGreatCircle.- Returns:
- precision object used to perform floating point comparisons.
-