java.lang.Object
org.apache.commons.math3.geometry.enclosing.EnclosingBall<S,P>
- Type Parameters:
S- Space type.P- Point type.
- All Implemented Interfaces:
Serializable
public class EnclosingBall<S extends Space, P extends Point<S>>
extends Object
implements Serializable
This class represents a ball enclosing some points.
- Since:
- 3.3
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if a point is within the ball or at boundary.booleanCheck if a point is within an enlarged ball or at boundary.Get the center of the ball.doubleGet the radius of the ball.P[]Get the support points used to define the ball.intGet the number of support points used to define the ball.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerializable UID.- See Also:
-
center
-
radius
private final double radiusRadius of the ball. -
support
-
-
Constructor Details
-
EnclosingBall
-
-
Method Details
-
getCenter
-
getRadius
public double getRadius()Get the radius of the ball.- Returns:
- radius of the ball (can be negative if the ball is empty)
-
getSupport
Get the support points used to define the ball.- Returns:
- support points used to define the ball
-
getSupportSize
public int getSupportSize()Get the number of support points used to define the ball.- Returns:
- number of support points used to define the ball
-
contains
Check if a point is within the ball or at boundary.- Parameters:
point- point to test- Returns:
- true if the point is within the ball or at boundary
-
contains
Check if a point is within an enlarged ball or at boundary.- Parameters:
point- point to testmargin- margin to consider- Returns:
- true if the point is within the ball enlarged by the margin or at boundary
-