Navigation:
Up,
Table of Contents,
Bibliography,
Index,
Title Page
Computing General Extremal
Polygons
This section describes a general function to compute a maximal
-gon that can be inscribed in a given convex polygon .
The criterion for maximality and some basic operations have to
specified in an appropriate traits class as specified in section
.
#include <CGAL/extremal_polygons_2.h>
template < class RandomAccessIC, class OutputIterator, class Traits >
|
OutputIterator
|
extremal_polygon ( | |
RandomAccessIC points_begin,
RandomAccessIC points_end,
int k,
OutputIterator o,
Traits t) |
|
computes a maximal (as specified by t) inscribed -gon of
the convex polygon described by [points_begin,
points_end), writes its vertices to o and returns the
past-the-end iterator of this sequence.
Precondition
- Traits has to satisfy the requirements stated in section
,
- Value type of RandomAccessIC must be
Traits::Point_2,
- OutputIterator accepts Traits::Point_2 as value
type,
- the - at least three - points denoted by the range
[points_begin, points_end) form the boundary of a
convex polygon (oriented clock- or counterclockwise) and
- .
Implementation
The implementation uses monotone matrix
search[AKM87] and has a worst case running time of
log, where is the number of vertices
in .
Next: Class declaration of Exp_traits
Navigation:
Up,
Table of Contents,
Bibliography,
Index,
Title Page
The GALIA project. Jan 18, 2000.