Move function documentation to the right place

This commit is contained in:
Andreas Fabri 2012-08-20 10:58:30 +00:00
parent d12b1916ca
commit 17b59d98d2
9 changed files with 160 additions and 145 deletions

View File

@ -3,9 +3,13 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Functions
The function `ch_akl_toussaint` generates the counterclockwise sequence of extreme
points from a given set of input points.
generates the counterclockwise sequence of extreme points
of the points in the range [`first`,`beyond`).
The resulting sequence is placed starting at position
`result`, and the past-the-end iterator for the resulting
sequence is returned. It is not specified at which point the
cyclic sequence of extreme points is cut into a linear sequence.
\pre The source range [`first`,`beyond`) does not contain `result`.
The default traits class `Default_traits` is the kernel in which the
type `ForwardIterator::value_type` is defined.
@ -42,13 +46,7 @@ This function uses the algorithm of Akl and
Toussaint \cite at-fcha-78 that requires \f$ O(n \log n)\f$ time for \f$ n\f$ input
points.
generates the counterclockwise sequence of extreme points
of the points in the range [`first`,`beyond`).
The resulting sequence is placed starting at position
`result`, and the past-the-end iterator for the resulting
sequence is returned. It is not specified at which point the
cyclic sequence of extreme points is cut into a linear sequence.
\pre The source range [`first`,`beyond`) does not contain `result`.
*/
template <class ForwardIterator, class OutputIterator, class Traits>
OutputIterator

View File

@ -3,8 +3,13 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Functions
The function `ch_bykat` generates the counterclockwise sequence of extreme
points from a given set of input points.
generates the counterclockwise sequence of extreme points
of the points in the range [`first`,`beyond`).
The resulting sequence is placed starting at position
`result`, and the past-the-end iterator for the resulting
sequence is returned. It is not specified at which point the
cyclic sequence of extreme points is cut into a linear sequence.
\pre The source range [`first`,`beyond`) does not contain `result`.
The default traits class `Default_traits` is the kernel in which the
type `ForwardIterator::value_type` is defined.
@ -43,13 +48,7 @@ Eddy's algorithm \cite e-nchap-77 described in \cite b-chfsp-78.
This algorithm requires \f$ O(n h)\f$ time
in the worst case for \f$ n\f$ input points with \f$ h\f$ extreme points.
generates the counterclockwise sequence of extreme points
of the points in the range [`first`,`beyond`).
The resulting sequence is placed starting at position
`result`, and the past-the-end iterator for the resulting
sequence is returned. It is not specified at which point the
cyclic sequence of extreme points is cut into a linear sequence.
\pre The source range [`first`,`beyond`) does not contain `result`.
*/
template <class InputIterator, class OutputIterator, class Traits>
OutputIterator

View File

@ -3,8 +3,13 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Functions
The function `ch_eddy` generates the counterclockwise sequence of extreme
points from a given set of input points.
generates the counterclockwise sequence of extreme points
of the points in the range [`first`,`beyond`).
The resulting sequence is placed starting at position
`result`, and the past-the-end iterator for the resulting
sequence is returned. It is not specified at which point the
cyclic sequence of extreme points is cut into a linear sequence.
\pre The source range [`first`,`beyond`) does not contain `result`.
The default traits class `Default_traits` is the kernel in which the
type `ForwardIterator::value_type` is defined.
@ -40,18 +45,11 @@ Implementation
This function implements Eddy's algorithm
\cite e-nchap-77, which is the two-dimensional version of the quickhull
algorithm \cite bdh-qach-96 .
algorithm \cite bdh-qach-96.
This algorithm requires \f$ O(n h)\f$ time
in the worst case for \f$ n\f$ input points with \f$ h\f$ extreme points.
generates the counterclockwise sequence of extreme points
of the points in the range [`first`,`beyond`).
The resulting sequence is placed starting at position
`result`, and the past-the-end iterator for the resulting
sequence is returned. It is not specified at which point the
cyclic sequence of extreme points is cut into a linear sequence.
\pre The source range [`first`,`beyond`) does not contain `result`.
*/
template <class InputIterator, class OutputIterator, class Traits>
OutputIterator

View File

@ -3,8 +3,14 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Functions
The function `ch_graham_andrew` generates the counterclockwise sequence of extreme
points from a given set of input points.
generates the counterclockwise sequence of extreme points
of the points in the range [`first`,`beyond`).
The resulting sequence is placed starting at position
`result`, and the past-the-end iterator for the resulting
sequence is returned. It is not specified at which point the
cyclic sequence of extreme points is cut into a linear sequence.
\pre The source range [`first`,`beyond`) does not contain `result`.
The default traits class `Default_traits` is the kernel in which the
type `InputIterator::value_type` is defined.
@ -45,13 +51,7 @@ scan algorithm \cite a-aeach-79 and follows the presentation of Mehlhorn
\cite m-mdscg-84. This algorithm requires \f$ O(n \log n)\f$ time
in the worst case for \f$ n\f$ input points.
generates the counterclockwise sequence of extreme points
of the points in the range [`first`,`beyond`).
The resulting sequence is placed starting at position
`result`, and the past-the-end iterator for the resulting
sequence is returned. It is not specified at which point the
cyclic sequence of extreme points is cut into a linear sequence.
\pre The source range [`first`,`beyond`) does not contain `result`.
*/
template <class InputIterator, class OutputIterator, class Traits>
OutputIterator
@ -67,7 +67,7 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Subsequence
The function `ch_graham_andrew_scan` generates the counterclockwise sequence of extreme
The function `::ch_graham_andrew_scan` generates the counterclockwise sequence of extreme
points from a given set of input points that are not left of the line defined
by the first and last points in this sequence.
@ -98,13 +98,13 @@ Implementation
--------------
The function uses Andrew's
variant of the Graham scan algorithm \cite a-aeach-79 . This algorithm
variant of the Graham scan algorithm \cite a-aeach-79. This algorithm
requires \f$ O(n \log n)\f$ time in the worst case for \f$ n\f$ input points.
Example
--------------
In the following example `ch_graham_andrew_scan()` is used to
In the following example `::ch_graham_andrew_scan` is used to
realize Anderson's variant \cite a-readc-78 of the Graham Scan
\cite g-eadch-72. The points are sorted counterclockwise around the leftmost
point using the `Less_rotate_ccw_2` predicate, as defined in

View File

@ -3,8 +3,13 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Functions
The function `ch_jarvis` generates the counterclockwise sequence of extreme
points from a given set of input points.
generates the counterclockwise sequence of extreme points
of the points in the range [`first`,`beyond`).
The resulting sequence is placed starting at position
`result`, and the past-the-end iterator for the resulting
sequence is returned. It is not specified at which point the
cyclic sequence of extreme points is cut into a linear sequence.
\pre The source range [`first`,`beyond`) does not contain `result`.
The default traits class `Default_traits` is the kernel in which the
type `InputIterator::value_type` is defined.
@ -42,13 +47,7 @@ This function uses the Jarvis march (gift-wrapping)
algorithm \cite j-ichfs-73. This algorithm requires \f$ O(n h)\f$ time
in the worst case for \f$ n\f$ input points with \f$ h\f$ extreme points.
generates the counterclockwise sequence of extreme points
of the points in the range [`first`,`beyond`).
The resulting sequence is placed starting at position
`result`, and the past-the-end iterator for the resulting
sequence is returned. It is not specified at which point the
cyclic sequence of extreme points is cut into a linear sequence.
\pre The source range [`first`,`beyond`) does not contain `result`.
*/
template <class InputIterator, class OutputIterator, class Traits>
OutputIterator

View File

@ -3,8 +3,12 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Functions
The function `ch_melkman` computes the counterclockwise sequence of
extreme points of a sequence of points that forms a simple polyline or polygon.
generates the counterclockwise sequence of extreme points
of the points in the range [`first`, `beyond`).
The resulting sequence is placed starting at
position `result`, and the past-the-end iterator for
the resulting sequence is returned.
\pre The source range [`first`,`beyond`) corresponds to a simple polyline. [`first`,`beyond`) does not contain `result`.
The default traits class `Default_traits` is the kernel in which the
type `InputIterator::value_type` is defined.
@ -40,12 +44,7 @@ Implementation
It uses an implementation of Melkman's algorithm \cite m-olcch-87.
Running time of this is linear.
generates the counterclockwise sequence of extreme points
of the points in the range [`first`, `beyond`).
The resulting sequence is placed starting at
position `result`, and the past-the-end iterator for
the resulting sequence is returned.
\pre The source range [`first`,`beyond`) corresponds to a simple polyline. [`first`,`beyond`) does not contain `result`.
*/
template <class InputIterator, class OutputIterator>
OutputIterator

View File

@ -3,9 +3,14 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Extreme
The function `ch_e_point` finds a point of a given set
The function `::ch_e_point` finds a point of a given set
of input points with maximal \f$ x\f$ coordinate.
It traverses the range [`first`,`beyond`).
After execution, the value of
`e` is an iterator in the range such that `*e` \f$ \ge_{xy}\f$
`*it` for all iterators `it` in the range.
The default traits class `Default_traits` is the kernel in which the
type `ForwardIterator::value_type` is defined.
@ -23,10 +28,7 @@ function that returns an instance of this type.
\sa `CGAL::ch_w_point`
\sa `CGAL::ch_we_point`
traverses the range [`first`,`beyond`).
After execution, the value of
`e` is an iterator in the range such that `*e` \f$ \ge_{xy}\f$
`*it` for all iterators `it` in the range.
*/
template <class ForwardIterator>
void
@ -41,9 +43,14 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Extreme
The function `ch_n_point` finds a point in a given set
The function `::ch_n_point` finds a point in a given set
of input points with maximal \f$ y\f$ coordinate.
It traverses the range [`first`,`beyond`).
After execution, the value of
`n` is an iterator in the range such that `*n` \f$ \ge_{yx}\f$
`*it` for all iterators `it` in the range.
The default traits class `Default_traits` is the kernel in which the type
`ForwardIterator::value_type` is defined.
@ -61,10 +68,7 @@ function that returns an instance of this type.
\sa `CGAL::ch_w_point`
\sa `CGAL::ch_we_point`
traverses the range [`first`,`beyond`).
After execution, the value of
`n` is an iterator in the range such that `*n` \f$ \ge_{yx}\f$
`*it` for all iterators `it` in the range.
*/
template <class ForwardIterator>
void
@ -79,9 +83,16 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Extreme
The function `ch_ns_point` finds the points of a given set
The function `::ch_ns_point` finds the points of a given set
of input points with minimal and maximal \f$ x\f$ coordinates.
It traverses the range [`first`,`beyond`).
After execution, the value of
`n` is an iterator in the range such that `*n` \f$ \ge_{yx}\f$
`*it` for all iterators `it` in the range. Similarly, for
`s` the inequality `*s` \f$ \le_{yx}\f$ `*it`
holds for all iterators in the range.
The default traits class `Default_traits` is the kernel in which the
type `ForwardIterator::value_type` is defined.
@ -99,12 +110,7 @@ function that returns an instance of this type.
\sa `CGAL::ch_w_point`
\sa `CGAL::ch_we_point`
traverses the range [`first`,`beyond`).
After execution, the value of
`n` is an iterator in the range such that `*n` \f$ \ge_{yx}\f$
`*it` for all iterators `it` in the range. Similarly, for
`s` the inequality `*s` \f$ \le_{yx}\f$ `*it`
holds for all iterators in the range.
*/
template <class ForwardIterator>
void
@ -120,11 +126,20 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Extreme
The function `ch_nswe_point` finds the four extreme points of a given set
The function `::ch_nswe_point` finds the four extreme points of a given set
of input points using a linear scan of the input points.
That is, it determines the points with maximal \f$ y\f$, minimal \f$ y\f$,
minimal \f$ x\f$, and maximal \f$ x\f$ coordinates.
It traverses the range [`first`,`beyond`).
After execution, the value of
`n` is an iterator in the range such that `*n` \f$ \ge_{yx}\f$
`*it` for all iterators `it` in the range. Similarly, for
`s`, `w`, and `e` the inequalities `*s` \f$ \le_{yx}\f$
`*it`, `*w` \f$ \le_{xy}\f$ `*it`, and `*e`
\f$ \ge_{xy}\f$ `*it` hold for all iterators
`it` in the range.
Requirements
--------------
@ -146,14 +161,7 @@ type `ForwardIterator::value_type` is defined.
\sa `CGAL::ch_w_point`
\sa `CGAL::ch_we_point`
traverses the range [`first`,`beyond`).
After execution, the value of
`n` is an iterator in the range such that `*n` \f$ \ge_{yx}\f$
`*it` for all iterators `it` in the range. Similarly, for
`s`, `w`, and `e` the inequalities `*s` \f$ \le_{yx}\f$
`*it`, `*w` \f$ \le_{xy}\f$ `*it`, and `*e`
\f$ \ge_{xy}\f$ `*it` hold for all iterators
`it` in the range.
*/
template <class ForwardIterator>
void
@ -171,9 +179,14 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Extreme
The function `ch_s_point` finds a points in a given set
The function `::ch_s_point` finds a points in a given set
of input points with minimal \f$ y\f$ coordinates.
It traverses the range [`first`,`beyond`).
After execution, the value of
`s` is an iterator in the range such that `*s` \f$ \le_{yx}\f$
`*it` for all iterators `it` in the range.
The default traits class `Default_traits` is the kernel in which the
type `ForwardIterator::value_type` is defined.
@ -191,10 +204,7 @@ function that returns an instance of this type.
\sa `CGAL::ch_w_point`
\sa `CGAL::ch_we_point`
traverses the range [`first`,`beyond`).
After execution, the value of
`s` is an iterator in the range such that `*s` \f$ \le_{yx}\f$
`*it` for all iterators `it` in the range.
*/
template <class ForwardIterator>
void
@ -209,9 +219,16 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Extreme
The function `ch_we_point` finds two points of a given set
The function `::ch_we_point` finds two points of a given set
of input points with minimal and maximal \f$ x\f$ coordinates.
It traverses the range [`first`,`beyond`).
After execution, the value of
`w` is an iterator in the range such that `*w` \f$ \le_{xy}\f$
`*it` for all iterators `it` in the range. Similarly, for
`e` the inequality `*e` \f$ \ge_{xy}\f$ `*it`
holds for all iterators in the range.
The default traits class `Default_traits` is the kernel in which the
type `ForwardIterator::value_type` is defined.
@ -229,12 +246,7 @@ function that returns an instance of this type.
\sa `CGAL::ch_s_point`
\sa `CGAL::ch_w_point`
traverses the range [`first`,`beyond`).
After execution, the value of
`w` is an iterator in the range such that `*w` \f$ \le_{xy}\f$
`*it` for all iterators `it` in the range. Similarly, for
`e` the inequality `*e` \f$ \ge_{xy}\f$ `*it`
holds for all iterators in the range.
*/
template <class ForwardIterator>
void
@ -250,9 +262,14 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Extreme
The function `ch_w_point` finds a point in a given set
The function `::ch_w_point` finds a point in a given set
of input points with minimal \f$ x\f$ coordinate.
It traverses the range [`first`,`beyond`).
After execution, the value of
`w` is an iterator in the range such that `*w` \f$ \le_{xy}\f$
`*it` for all iterators `it` in the range.
Requirements
--------------
@ -270,10 +287,7 @@ type `ForwardIterator::value_type` is defined.
\sa `CGAL::ch_s_point`
\sa `CGAL::ch_we_point`
traverses the range [`first`,`beyond`).
After execution, the value of
`w` is an iterator in the range such that `*w` \f$ \le_{xy}\f$
`*it` for all iterators `it` in the range.
*/
template <class ForwardIterator>
void

View File

@ -3,9 +3,17 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Functions
The function `convex_hull_2` generates the counterclockwise sequence of extreme
The function `::convex_hull_2` generates the counterclockwise sequence of extreme
points from a given set of input points.
It generates the counterclockwise sequence of extreme points
of the points in the range [`first`,`beyond`).
The resulting sequence is placed starting at position
`result`, and the past-the-end iterator for the resulting
sequence is returned. It is not specified at which point the
cyclic sequence of extreme points is cut into a linear sequence.
\pre The source range [`first`,`beyond`) does not contain `result`.
The default traits class `Default_traits` is the kernel in which
the type `InputIterator::value_type` is defined.
@ -46,13 +54,7 @@ points and \f$ h\f$ is the number of extreme points. For all other types of
iterators, the \f$ O(n \log n)\f$ algorithm of of Akl and Toussaint
\cite at-fcha-78 is used.
generates the counterclockwise sequence of extreme points
of the points in the range [`first`,`beyond`).
The resulting sequence is placed starting at position
`result`, and the past-the-end iterator for the resulting
sequence is returned. It is not specified at which point the
cyclic sequence of extreme points is cut into a linear sequence.
\pre The source range [`first`,`beyond`) does not contain `result`.
*/
template <class InputIterator, class OutputIterator>
OutputIterator
@ -67,13 +69,25 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Subsequence
The function `lower_hull_points_2` generates the counterclockwise sequence of extreme
The function `::lower_hull_points_2` generates the counterclockwise sequence of extreme
points on the lower hull of a given set of input points.
It generates the counterclockwise sequence of extreme points
on the lower hull of the points in the range [`first`,
`beyond`). The resulting sequence is placed starting at
position `result`, and the past-the-end iterator for
the resulting sequence is returned.
The sequence starts with the leftmost point;
the rightmost point is not included.
If there is only one extreme point (<I>i.e.</I>, leftmost and
rightmost point are equal) the extreme point is reported.
\pre The source range [`first`,`beyond`) does not contain
`result`.
The default traits class `Default_traits` is the kernel in which the
type `InputIterator::value_type` is defined.
The different treatment by `CGAL::upper_hull_points_2` of the case that
The different treatment by `::upper_hull_points_2` of the case that
all points are equal ensures that concatenation of lower and upper hull
points gives the sequence of extreme points.
@ -106,17 +120,7 @@ This function uses Andrew's variant of Graham's scan algorithm
\cite a-aeach-79, \cite m-mdscg-84. The algorithm has worst-case running time
of \f$ O(n \log n)\f$ for \f$ n\f$ input points.
generates the counterclockwise sequence of extreme points
on the lower hull of the points in the range [`first`,
`beyond`). The resulting sequence is placed starting at
position `result`, and the past-the-end iterator for
the resulting sequence is returned.
The sequence starts with the leftmost point;
the rightmost point is not included.
If there is only one extreme point (<I>i.e.</I>, leftmost and
rightmost point are equal) the extreme point is reported.
\pre The source range [`first`,`beyond`) does not contain
`result`.
*/
template <class InputIterator, class OutputIterator>
OutputIterator
@ -131,13 +135,25 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Subsequence
The function `upper_hull_points_2` generates the counterclockwise sequence of extreme
The function `::upper_hull_points_2` generates the counterclockwise sequence of extreme
points on the upper hull of a given set of input points.
It generates the counterclockwise sequence of extreme points
on the upper hull of the points in the range [`first`,
`beyond`). The resulting sequence is placed starting at
position `result`, and the past-the-end iterator for
the resulting sequence is returned.
The sequence starts with the rightmost point,
the leftmost point is not included.
If there is only one extreme point (<I>i.e.</I>, the leftmost and
rightmost point are equal), the extreme point is not reported.
\pre The source range [`first`,`beyond`) does not contain
`result`.
The default traits class `Default_traits` is the kernel in which the
type `InputIterator::value_type` is defined.
The different treatment by `CGAL::lower_hull_points_2` of the case that
The different treatment by `::lower_hull_points_2` of the case that
all points are equal ensures that concatenation of lower and upper hull
points gives the sequence of extreme points.
@ -170,17 +186,7 @@ This function uses Andrew's
variant of Graham's scan algorithm \cite a-aeach-79, \cite m-mdscg-84. The algorithm
has worst-case running time of \f$ O(n \log n)\f$ for \f$ n\f$ input points.
generates the counterclockwise sequence of extreme points
on the upper hull of the points in the range [`first`,
`beyond`). The resulting sequence is placed starting at
position `result`, and the past-the-end iterator for
the resulting sequence is returned.
The sequence starts with the rightmost point,
the leftmost point is not included.
If there is only one extreme point (<I>i.e.</I>, the leftmost and
rightmost point are equal), the extreme point is not reported.
\pre The source range [`first`,`beyond`) does not contain
`result`.
*/
template <class InputIterator, class OutputIterator>
OutputIterator

View File

@ -3,8 +3,12 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Convexity
The function `is_ccw_strongly_convex_2` determines if a given sequence of points defines
The function `::is_ccw_strongly_convex_2` determines if a given sequence of points defines
a counterclockwise-oriented, strongly convex polygon.
It returns `true`, iff the point elements in
[`first`,`beyond`)
form a counterclockwise-oriented strongly convex polygon.
A set of points is said to be strongly convex
if it consists of only extreme points
(<I>i.e.</I>, vertices of the convex hull).
@ -32,9 +36,7 @@ Implementation
The algorithm requires \f$ O(n)\f$ time for a set of \f$ n\f$ input points.
returns `true`, iff the point elements in
[`first`,`beyond`)
form a counterclockwise-oriented strongly convex polygon.
*/
template <class ForwardIterator, class Traits>
@ -51,12 +53,14 @@ namespace CGAL {
/*!
\ingroup PkgConvexHull2Convexity
The function `is_cw_strongly_convex_2` determines if a given sequence of points defines
The function `::is_cw_strongly_convex_2` determines if a given sequence of points defines
a clockwise-oriented, strongly convex polygon.
It returns `true`, iff the point elements in
[`first`,`beyond`)
form a clockwise-oriented strongly convex polygon.
A set of points is said to be strongly convex
<A NAME="Index_anchor_76"></A>
if it consists of only extreme points
(<I>i.e.</I>, vertices of the convex hull).
@ -83,9 +87,7 @@ Implementation
The algorithm requires \f$ O(n)\f$ time for a set of \f$ n\f$ input points.
returns `true`, iff the point elements in
[`first`,`beyond`)
form a clockwise-oriented strongly convex polygon.
*/
template <class ForwardIterator, class Traits>