org.moyoman.module.geometry
Interface ConvexHull

All Superinterfaces:
Cloneable, Serializable
All Known Implementing Classes:
ConvexHullImpl

public interface ConvexHull
extends Cloneable, Serializable

A class that implements this interface represents the convex hull of a set of points. No assumptions are made as to whether these points contain stones. Various operations can be performed on this convex hull, such as finding the points on or inside of it.


Method Summary
 Point[] getPointsInConvexHull()
          Return the points which are inside the convex hull.
 Point[] getPointsOnConvexHull()
          Return the points which are on the convex hull.
 int getTotalPointsInConvexHull()
          Get the total number of points in the convex hull for this group.
 Point[] getVertices()
          Get the vertices of the convex hull.
 

Method Detail

getPointsInConvexHull

public Point[] getPointsInConvexHull()
Return the points which are inside the convex hull. These points may be empty, or be occupied by a stone of either color. Points that are on the convex hull are NOT returned by this method.

Returns:
An array of Point objects.

getPointsOnConvexHull

public Point[] getPointsOnConvexHull()
Return the points which are on the convex hull. These points may be empty, or be occupied by a stone of either color. It includes, but is not limited to, all of the vertices of the convex hull.

Returns:
An array of Point objects.

getTotalPointsInConvexHull

public int getTotalPointsInConvexHull()
Get the total number of points in the convex hull for this group.

Returns:
an int, which is the same as getPointsInConvexHull().length.

getVertices

public Point[] getVertices()
Get the vertices of the convex hull. This is a subset of the points for which the convex hull was computed.

Returns:
An array of Point objects which are the vertices of the convex hull.