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

Closest pair of points via divide and conquer. More...

#include <geom_algorithms.H>
#include <cassert>
#include <iostream>
Include dependency graph for closest_pair_example.cc:

Go to the source code of this file.

Functions

static void print_banner (const char *title)
 
static Geom_Number brute_distance_squared (const DynList< Point > &pts, Point &out_a, Point &out_b)
 
int main ()
 

Detailed Description

Closest pair of points via divide and conquer.

Demonstrates:

  • ClosestPairDivideAndConquer in O(n log n)
  • Optional brute-force verification on the same dataset
See also
geom_algorithms.H
ClosestPairDivideAndConquer

Definition in file closest_pair_example.cc.

Function Documentation

◆ brute_distance_squared()

static Geom_Number brute_distance_squared ( const DynList< Point > &  pts,
Point out_a,
Point out_b 
)
static

◆ main()

◆ print_banner()

static void print_banner ( const char *  title)
static

Definition at line 52 of file closest_pair_example.cc.

Referenced by main().