Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qgar::GenConvexHull< T >::_sortPred Struct Reference

#include <GenConvexHull.H>

List of all members.


Detailed Description

template<class T>
struct qgar::GenConvexHull< T >::_sortPred

To compare angles about the pivot when sorting points to construct their hull.

Definition at line 313 of file GenConvexHull.H.

Public Member Functions

bool operator() (const std::pair< double, GenPoint< T > > &aPair1, const std::pair< double, GenPoint< T > > &aPair2)
 Compares angles about the pivot when sorting points to construct their hull.


Member Function Documentation

template<class T>
bool qgar::GenConvexHull< T >::_sortPred::operator() const std::pair< double, GenPoint< T > > &  aPair1,
const std::pair< double, GenPoint< T > > &  aPair2
[inline]
 

Compares angles about the pivot when sorting points to construct their hull.

When angles are equal, pairs are sorted according to decreasing Y coordinates of the corresponding points, and, when Y coordinates are equal, according to increasing X coordinates: The pivot is thus guaranteed to be the leftmost point of minimum Y coordinate.

Parameters:
aPair1 The lhs parameter of the comparison.
aPair2 The rhs parameter of the comparison.

Definition at line 328 of file GenConvexHull.H.


The documentation for this struct was generated from the following file: