The function is_simple_2 computes if a polygon is simple, that is, does not
A polygon is called simple if the edges do not intersect, except consecutive
edge in their common vertex. This function checks if the polygon defined by the
range first ... last is simple.
template <class ForwardIterator, class Traits>
is_simple_2 ( ForwardIterator first, ForwardIterator last, Traits traits)
- Traits is a model of the concept
Only the following members of this traits class are used:
- ForwardIterator::value_type should be Traits::Point_2,
The simplicity test is implemented by means of a plane sweep algorithm.
The algorithm is quite robust when used with inexact number types.
The running time is O(n log n), where n is the number of vertices of the