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 GreatCircle
The 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.DoubleEquivalence
Return the object used to perform floating point comparisons, which is the same object used by the underlyingGreatCircle
.double
getSize()
Get the size of the instance.abstract HyperplaneBoundedRegion
<Point1S> Get the embedded subspace region.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.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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.commons.geometry.core.Embedding
toSpace, toSubspace
Methods inherited from interface org.apache.commons.geometry.core.partitioning.HyperplaneSubset
contains, transform
Methods inherited from interface org.apache.commons.geometry.core.Sized
isFinite, isInfinite
Methods inherited from interface org.apache.commons.geometry.core.partitioning.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:
getHyperplane
in interfaceHyperplaneSubset<Point2S>
- Returns:
- the hyperplane containing this instance
-
toSubspace
Transform a space point into a subspace point.- Specified by:
toSubspace
in interfaceEmbedding<Point2S,
Point1S> - Parameters:
pt
- n-dimension point of the space- Returns:
- lower-dimension point of the subspace corresponding to the specified space point
- See Also:
-
toSpace
Transform a subspace point into a space point. -
isFull
public boolean isFull()Return true if this instance contains all points in the hyperplane.- Specified by:
isFull
in 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:
isEmpty
in interfaceHyperplaneSubset<Point2S>
- Returns:
- true if this instance does not contain any points
-
getSize
public double getSize()Get the size of the instance. -
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:
getCentroid
in 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:
classify
in 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:
closest
in 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:
toConvex
in 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:
getSubspaceRegion
in 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.
-