Class ConvexHullGrahamScan_F64

java.lang.Object
georegression.fitting.polygon.ConvexHullGrahamScan_F64
All Implemented Interfaces:
FitConvexHull_F64

public class ConvexHullGrahamScan_F64 extends Object implements FitConvexHull_F64
Finds the convex hull using Graham Scan. Runtime complexity of O(n log n).
  • Constructor Details

    • ConvexHullGrahamScan_F64

      public ConvexHullGrahamScan_F64()
  • Method Details

    • process

      public void process(FastAccess<Point2D_F64> points, Polygon2D_F64 output)
      Fits a convex hull to the provided set of points. The list is modified by changing the order of points inside of it. If the input is a degenerate case where there is no clear solution it will do the following: A single point will return a single point. If all points lie along a line (2 or more points) then a polygon that's composed of two points will be returned.
      Specified by:
      process in interface FitConvexHull_F64
      Parameters:
      points - (Input, Output) Point that the convex hull is fit to. This list will be re-ordered.
      output - (Output) The found convex hull.