|
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.PartialHull
public class PartialHull
Represents either the top or the bottom of a Convex Hull.
Constructor Summary | |
---|---|
PartialHull(IPoint first,
IPoint second)
Construct the initial partial hull. |
Method Summary | |
---|---|
void |
add(IPoint p)
Add point to the Partial Hull. |
boolean |
areLastThreeNonRight()
Determines if last three points reflect a right turn. |
IPoint[] |
getPoints()
Return the points in this Partial Hull. |
boolean |
hasThree()
Determine if there are more than 2 points currently in the partial hull. |
java.util.Iterator<IPoint> |
points()
Return the points in this Partial Hull as an Iterator. |
boolean |
removeMiddleOfLastThree()
Returns middle of last three. |
int |
size()
Helper function to report number of points in the hull. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PartialHull(IPoint first, IPoint second)
first
- Left-most point (for upper) and right-most (for lower)second
- Next one in sorted order, as the next assumed point in the hull.Method Detail |
---|
public void add(IPoint p)
public boolean removeMiddleOfLastThree()
public boolean hasThree()
public int size()
public IPoint[] getPoints()
public java.util.Iterator<IPoint> points()
public boolean areLastThreeNonRight()
|
Algorithm Development Kit 1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |