Effective implementation of algorithms (Master Thesis)
Effective and error-free implementation of algorithms
|
#include <convex_hull.h>
Classes | |
class | PointCompare |
Public Types | |
typedef Point< T > | PointType |
Public Member Functions | |
void | clear () |
void | addPoint (const PointType point) |
std::vector< PointType > | convexHull () |
Private Member Functions | |
std::vector< PointType > | computeChain (const std::vector< PointType > data) |
std::vector< PointType > | rotate180 (const std::vector< PointType > data) |
Private Attributes | |
std::vector< PointType > | data |
Class computing the convex hull of a set of points
typedef Point<T> geometry::two_d::ConvexHull< T >::PointType |
void geometry::two_d::ConvexHull< T >::addPoint | ( | const PointType | point | ) | [inline] |
Add a new point.
void geometry::two_d::ConvexHull< T >::clear | ( | ) | [inline] |
Removes all points.
std::vector<PointType> geometry::two_d::ConvexHull< T >::computeChain | ( | const std::vector< PointType > | data | ) | [inline, private] |
Returns monotone chain
Chain starts at leftmost point (in case of more leftmost points the one with smallest y coordinate), it is upper half of the convex hull and ends in rightmost (in case of tie the topmost one of them) point
std::vector<PointType> geometry::two_d::ConvexHull< T >::convexHull | ( | ) | [inline] |
Compute convex hull
Note: Convex hull of an empty set is an empty set.
std::vector<PointType> geometry::two_d::ConvexHull< T >::rotate180 | ( | const std::vector< PointType > | data | ) | [inline, private] |
Rotates all points by 180 degrees
std::vector<PointType> geometry::two_d::ConvexHull< T >::data [private] |
inserted points.