|
Algorithm Development Kit 1.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectalgs.model.problems.convexhull.bucket.BucketAndrew
public class BucketAndrew
Computes Convex Hull following Andrew's Algorithm. This algorithm is described in the text. We use BucketSort to sort the points.
Constructor Summary | |
---|---|
BucketAndrew()
|
Method Summary | |
---|---|
IPoint[] |
compute(IPoint[] points)
Return the computed convex hull for the input set of IPoint objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BucketAndrew()
Method Detail |
---|
public IPoint[] compute(IPoint[] points)
IConvexHull
Points must have at least three points to do anything meaningful. If it does not, then the sorted array is returned as the "hull".
Some implementations may be able to work if duplicate points are found,
but the set should contain distinct IPoint
objects.
compute
in interface IConvexHull
points
- an array of (n ≥ 3) two dimensional points.
|
Algorithm Development Kit 1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |