|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Brute force convex hull algorithm. More...
#include <geom_algorithms.H>
Classes | |
| struct | CmpSegment |
Public Member Functions | |
| Polygon | operator() (DynList< Point > &point_set) |
| Compute the convex hull of a point set. | |
Private Types | |
| using | SegmentSet = DynSetTree< Segment, Treap_Rk, CmpSegment > |
| using | PointIt = DynList< Point >::Iterator |
Private Member Functions | |
| bool | are_all_points_on_left (DynList< Point > &l, const Segment &s) |
| SegmentSet | extreme_edges (DynList< Point > &point_set) |
Brute force convex hull algorithm.
Computes the convex hull by testing all pairs of points to find extreme edges (edges where all other points are on one side).
For each pair of points (p, q): If all other points are to the left of segment (p, q), then (p, q) is an edge of the convex hull.
Definition at line 347 of file geom_algorithms.H.
|
private |
Definition at line 370 of file geom_algorithms.H.
Definition at line 369 of file geom_algorithms.H.
|
inlineprivate |
Definition at line 385 of file geom_algorithms.H.
References are_all_points_on_left(), Aleph::DynList< T >::insert(), and Aleph::maps().
Referenced by operator()().
Compute the convex hull of a point set.
| point_set | The input points. |
Definition at line 418 of file geom_algorithms.H.
References extreme_edges(), LocateFunctions< Container, Type >::find_ptr(), Segment::get_src_point(), Segment::get_tgt_point(), Aleph::maps(), and Aleph::DynList< T >::remove().