Algorithm
Development Kit 1.0

algs.model.problems.convexhull
Interface IConvexHull

All Known Implementing Classes:
BalancedTreeAndrew, BucketAndrew, ConvexHullScan, HeapAndrew, SlowHull

public interface IConvexHull

Defined interface for algorithms that compute the convex hull for a set of IPoint objects.

Since:
1.0
Version:
1.0, 6/15/08
Author:
George Heineman

Method Summary
 IPoint[] compute(IPoint[] points)
          Return the computed convex hull for the input set of IPoint objects.
 

Method Detail

compute

IPoint[] compute(IPoint[] points)
Return the computed convex hull for the input set of IPoint objects.

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.

Parameters:
points - an array of (n ≥ 3) two dimensional points.

Algorithm Development Kit 1.0

This code supports the Algorithms in a Nutshell book, published by O'Reilly Media, Inc. in November 2008. Please visit the book web page to learn of any changes to the code repository or to record a potential defect.