Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
convex_hull_comparison_example.cc File Reference

Compare 5 convex hull algorithms on one dataset. More...

#include <geom_algorithms.H>
#include <cassert>
#include <chrono>
#include <iomanip>
#include <iostream>
#include <sstream>
Include dependency graph for convex_hull_comparison_example.cc:

Go to the source code of this file.

Functions

static void print_banner (const char *title)
 
static DynList< Pointbuild_point_set ()
 
static string hull_signature (const Polygon &poly)
 
template<typename Algo >
static Polygon timed_hull (const char *name, Algo &algo, const DynList< Point > &pts, double &micros)
 
int main ()
 

Detailed Description

Compare 5 convex hull algorithms on one dataset.

Demonstrates:

  • AndrewMonotonicChainConvexHull
  • GrahamScanConvexHull
  • BruteForceConvexHull
  • GiftWrappingConvexHull
  • QuickHull
See also
geom_algorithms.H

Definition in file convex_hull_comparison_example.cc.

Function Documentation

◆ build_point_set()

static DynList< Point > build_point_set ( )
static

◆ hull_signature()

◆ main()

◆ print_banner()

static void print_banner ( const char *  title)
static

Definition at line 57 of file convex_hull_comparison_example.cc.

Referenced by main().

◆ timed_hull()

template<typename Algo >
static Polygon timed_hull ( const char *  name,
Algo &  algo,
const DynList< Point > &  pts,
double &  micros 
)
static

Definition at line 119 of file convex_hull_comparison_example.cc.

References Aleph::divide_and_conquer_partition_dp(), and h.

Referenced by main().