|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
QuickHull convex hull algorithm. More...
#include <geom_algorithms.H>
Public Member Functions | |
| Polygon | operator() (DynList< Point > &point_set) |
| Compute the convex hull of a point set. | |
Private Member Functions | |
| Point | get_fartest_point (DynList< Point > &point_set, const Segment &s) |
| std::pair< DynList< Point >, DynList< Point > > | get_right_points (DynList< Point > &point_set, const Point &a, const Point &b, const Point &c) |
| DynList< Point > | quick_hull (DynList< Point > &point_set, const Point &a, const Point &b) |
| std::pair< Point, Point > | search_extremes (DynList< Point > &point_set) |
| std::pair< DynList< Point >, DynList< Point > > | partition (DynList< Point > &point_set, const Point &a, const Point &b) |
QuickHull convex hull algorithm.
Computes the convex hull using a divide-and-conquer approach similar to QuickSort. Recursively finds the farthest point from a line and partitions the remaining points.
Definition at line 586 of file geom_algorithms.H.
|
inlineprivate |
Definition at line 588 of file geom_algorithms.H.
References Segment::get_perpendicular(), Aleph::HTList::Iterator::has_curr(), Aleph::maps(), and Aleph::HTList::size().
Referenced by quick_hull().
|
inlineprivate |
Definition at line 612 of file geom_algorithms.H.
References Aleph::DynList< T >::append(), Aleph::HTList::is_empty(), Aleph::maps(), and Aleph::DynList< T >::remove_first().
Referenced by quick_hull().
Compute the convex hull of a point set.
| point_set | The input points. |
Definition at line 699 of file geom_algorithms.H.
References Aleph::DynList< T >::append(), Aleph::HTList::concat(), Aleph::HTList::Iterator::has_curr(), Aleph::maps(), partition(), quick_hull(), and search_extremes().
|
inlineprivate |
Definition at line 674 of file geom_algorithms.H.
References Aleph::DynList< T >::append(), Aleph::HTList::Iterator::has_curr(), and Aleph::maps().
Referenced by operator()().
|
inlineprivate |
Definition at line 634 of file geom_algorithms.H.
References Aleph::DynList< T >::append(), Aleph::HTList::concat(), get_fartest_point(), get_right_points(), Aleph::HTList::is_empty(), Aleph::maps(), and quick_hull().
Referenced by operator()(), and quick_hull().
|
inlineprivate |
Definition at line 652 of file geom_algorithms.H.
References Aleph::DynList< T >::Iterator::get_curr(), Aleph::HTList::Iterator::has_curr(), Aleph::maps(), Aleph::HTList::Iterator::next(), and Aleph::HTList::Iterator::next_ne().
Referenced by operator()().