74#ifndef __ADS_ConvexHull
75 #define __ADS_ConvexHull
213inline std::vector< Point >
graham( std::vector< Point > P );
245inline std::vector< Point >
convexHull(
const std::vector< Point > & P );
255#include "ADS/geometry/impl/ConvexHull.tpp"
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
The sort that chooses its algorithm, beyond the book: sort() and stableSort() look at what they sort ...
bool sameSide(const Point &p1, const Point &p2, const Point &p, const Point &q)
true if and are on the same side of the line through and , or on it (the stessaparte() of the book...
long long cross(const Point &a, const Point &b, const Point &c)
the cross product : positive if is to the left of the line from to , 0 if on it; in long long,...
double pseudoAngle(long dx, long dy)
an increasing function of the angle of the vector , in and with no arctangent (exercise 16....
std::vector< Point > graham(std::vector< Point > P)
the vertices of the hull in counterclockwise order from the lowest point, the rightmost of the lowest...
std::vector< Point > convexHullBrute(std::vector< Point > P)
the hull by checking every segment, ; the vertices in counterclockwise order from the lowest one
std::vector< Point > convexHull(const std::vector< Point > &P)
the hull by the octagon of Akl and Toussaint, the radix sort and the monotone chain of Andrew; the ve...
a point of the plane, of integer coordinates
Definition ConvexHull.h:101
long y
the ordinate
Definition ConvexHull.h:103
bool operator==(const Point &) const =default
true if the two points have the same coordinates
long x
the abscissa
Definition ConvexHull.h:102