Algorithm
Development Kit 1.0

algs.model.problems.convexhull.heap
Class HeapAndrew

java.lang.Object
  extended by algs.model.problems.convexhull.heap.HeapAndrew
All Implemented Interfaces:
IConvexHull

public class HeapAndrew
extends java.lang.Object
implements IConvexHull

Computes Convex Hull following Andrew's Algorithm. This is described in the text. Uses a BinaryHeap as the sorting entity for the points.

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

Constructor Summary
HeapAndrew()
           
 
Method Summary
 IPoint[] compute(IPoint[] points)
          Use Andrew's algorithm to return the computed convex hull for the input set of points.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeapAndrew

public HeapAndrew()
Method Detail

compute

public IPoint[] compute(IPoint[] points)
Use Andrew's algorithm to return the computed convex hull for the input set of points. Implementation uses a Binary Heap rather than sorting initial set.

Specified by:
compute in interface IConvexHull
Parameters:
points - a set 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.