|
ADS
Algorithms and Data Structures
|
Files | |
| ClosestPair.h | |
| The closest pair of a set \( P \) of \( n \ge 2 \) points of the plane, the two points at the least Euclidean distance, by divide et impera in \( O( n \log n ) \) time, against the \( \Theta( n^2 ) \) of the comparison of all the pairs (closestPairBrute()). | |
| ConvexHull.h | |
| The convex hull of a set \( P \) of \( n \) points of the plane (section 16.1), the smallest convex polygon that contains them, as its vertices in counterclockwise order. | |
| IntervalTree.h | |
| The interval tree as an augmented map, beyond the book: a multiset of closed intervals \( [ a , b ] \) of a totally ordered type, kept in a map [see JoinTree.h] whose keys are the pairs \( ( a , b ) \) in lexicographic order, whose values are their multiplicities, and whose augmentation is the largest right end of the subtree, \( \mathit{aug}( u ) = \max \{ b : ( a , b ) \in T_u \} \), the monoid of the maximum on the right ends, whose identity is no interval. | |
| RangeTree.h | |
| The two-dimensional range tree of Bentley as an augmented map, beyond the book: a multiset of points \( ( x , y ) \) of the plane, kept in a map [see JoinTree.h] whose keys are the points in lexicographic order, whose values are their multiplicities, and whose augmentation is the sorted sequence of the ordinates of the subtree, with their copies: the monoid of the sorted sequences under the merge, whose identity is the empty sequence. | |