S
- Space type.P
- Point type.public class EnclosingBall<S extends Space,P extends Point<S>> extends Object implements Serializable
Space
,
Point
,
Encloser
,
Serialized FormConstructor and Description |
---|
EnclosingBall(P center,
double radius,
P... support)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(P point)
Check if a point is within the ball or at boundary.
|
boolean |
contains(P point,
double margin)
Check if a point is within an enlarged ball or at boundary.
|
P |
getCenter()
Get the center of the ball.
|
double |
getRadius()
Get the radius of the ball.
|
P[] |
getSupport()
Get the support points used to define the ball.
|
int |
getSupportSize()
Get the number of support points used to define the ball.
|
@SafeVarargs public EnclosingBall(P center, double radius, P... support)
center
- center of the ballradius
- radius of the ballsupport
- support points used to define the ballpublic P getCenter()
public double getRadius()
public P[] getSupport()
public int getSupportSize()
public boolean contains(P point)
point
- point to testpublic boolean contains(P point, double margin)
point
- point to testmargin
- margin to considerCopyright © 2016–2017 Hipparchus.org. All rights reserved.