public class FilteredConvexHull2D
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private double[] |
bottomleft
Top-left point
|
private double[] |
bottomright
Top-left point
|
private double |
bottomy
Left bound
|
private double |
leftx
Left bound
|
private java.util.List<double[]> |
points
The current set of candidate points.
|
private Polygon |
poly
Computed polygon.
|
private double |
rightx
Left bound
|
private double[] |
topleft
Top-left point
|
private double[] |
topright
Top-left point
|
private double |
topy
Left bound
|
Constructor and Description |
---|
FilteredConvexHull2D()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(double... point)
Add a single point to the list (this does not compute the hull!)
|
private boolean |
checkCandidate(double[] point) |
private boolean |
checkCandidateUpdate(double[] point)
Check whether a point is inside the current bounds, and update the bounds
|
private Polygon |
computeConvexHull()
Compute the convex hull.
|
Polygon |
getHull()
Compute the convex hull, and return the resulting polygon.
|
private java.util.List<double[]> points
private double leftx
private double rightx
private double topy
private double bottomy
private double[] topleft
private double[] topright
private double[] bottomright
private double[] bottomleft
private Polygon poly
public void add(double... point)
point
- Point to addprivate Polygon computeConvexHull()
private boolean checkCandidate(double[] point)
private boolean checkCandidateUpdate(double[] point)
point
- New pointtrue
if the point is potentially on the hullpublic Polygon getHull()
Copyright © 2019 ELKI Development Team. License information.