mirror of https://github.com/CGAL/cgal
moved to Convex_hull_2 directory
This commit is contained in:
parent
a07600bd3e
commit
7515ca4a76
|
|
@ -87,7 +87,6 @@ Packages/Arrangement/doc_tex/basic/Arrangement_2/arr3.gif svneol=native#unset
|
|||
Packages/Arrangement/doc_tex/basic/Arrangement_2/circles.gif svneol=native#unset
|
||||
Packages/Convex_hull_2/doc_tex/Convex_hull_2/saarhull.eps -text
|
||||
Packages/Convex_hull_2/doc_tex/Convex_hull_2/saarhull.gif -text svneol=unset#unset
|
||||
Packages/Convex_hull_2/doc_tex/basic/ConvexHull/saarhull.gif svneol=native#unset
|
||||
Packages/Convex_hull_2/doc_tex/basic/Convex_hull_2/saarhull.eps -text
|
||||
Packages/Convex_hull_2/doc_tex/basic/Convex_hull_2/saarhull.gif -text svneol=unset#unset
|
||||
Packages/Developers_manual/pictures/Object.eps -text
|
||||
|
|
|
|||
|
|
@ -1,129 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ConvexHullTraits_2.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 14.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefConcept}{ConvexHullTraits_2}
|
||||
\ccIndexTraitsClassRequirements[p]{convex hull, 2D}
|
||||
\ccIndexTraitsClassRequirements[p]{extreme points, 2D}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
All convex hull and extreme point algorithms provided in \cgal\ are
|
||||
parameterized with a traits class \ccStyle{Traits}, which defines the
|
||||
primitives (objects and predicates) that the convex hull algorithms use.
|
||||
\ccRefName\ defines the complete set of primitives required in these
|
||||
functions. The specific subset of these primitives required by each function
|
||||
is specified with each function.
|
||||
|
||||
\ccTypes
|
||||
\ccAutoIndexingOff
|
||||
\ccSetTwoColumns{ConvexHullTraits_2::Left_of_line_2}{}
|
||||
|
||||
\ccNestedType{Point_2}%
|
||||
{The point type on which the convex hull functions operate.}
|
||||
|
||||
\ccNestedType{Less_xy_2}%
|
||||
{Binary predicate object type comparing \ccc{Point_2}s
|
||||
lexicographically. Must provide
|
||||
\ccc{bool operator()(Point_2 p, Point_2 q)} where \ccc{true}
|
||||
is returned iff $p <_{xy} q$.
|
||||
We have $p<_{xy}q$, iff $p_x < q_x$ or $p_x = q_x$ and $p_y < q_y$,
|
||||
where $p_x$ and $p_y$ denote $x$ and $y$ coordinate of point $p$,
|
||||
respectively.
|
||||
}
|
||||
|
||||
\ccNestedType{Less_yx_2}%
|
||||
{Same as \ccc{Less_xy_2} with the roles of $x$ and $y$ interchanged.}
|
||||
|
||||
\ccNestedType{Leftturn_2}%
|
||||
{Predicate object type that must provide
|
||||
\ccc{bool operator()(Point_2 p,Point_2 q,Point_2 r)}, which
|
||||
returns \ccc{true} iff \ccc{r} lies to the left of the
|
||||
oriented line through \ccc{p} and \ccc{q}.}
|
||||
|
||||
\ccNestedType{Left_of_line_2}%
|
||||
{Unary predicate object type that
|
||||
must provide a constructor taking two \ccc{Point_2}s, $p$ and
|
||||
$q$, and \ccc{bool operator()(Point_2 r)}, which returns \ccc{true} iff
|
||||
$r$ lies to the left of the directed line through $p$ and $q$.}
|
||||
|
||||
\ccNestedType{Less_signed_distance_to_line_2}%
|
||||
{Binary predicate object type that must provide a constructor taking
|
||||
two \ccc{Point_2}s, $p$ and $q$, and
|
||||
\ccc{bool operator()(Point_2 r,Point_2 s)}, which returns \ccc{true} iff
|
||||
the signed distance from $r$ to the line $l_{pq}$ through $p$ and $q$
|
||||
is smaller than the distance from $s$ to $l_{pq}$. It is used to
|
||||
compute the point right of a line with maximum unsigned distance to
|
||||
the line. The binary predicate must provide a total order compatible
|
||||
with convexity, {\it i.e.}, for any line segment $s$ one of the
|
||||
endpoints
|
||||
of $s$ is the smallest point among the points on $s$, with respect to
|
||||
the order given by \ccc{Less_signed_distance_to_line_2}.}
|
||||
|
||||
\ccNestedType{Less_rotate_ccw_2}%
|
||||
{Binary predicate object type that must provide a constructor taking a
|
||||
\ccc{Point_2}, $e$, and \ccc{bool operator()(Point_2 p,Point_2 q)},
|
||||
where \ccc{true} is returned iff a tangent at $e$ to the point set
|
||||
$\{e,p,q\}$ hits $p$ before $q$ when rotated counterclockwise around
|
||||
$e$.
|
||||
Ties are broken such that the point with larger distance to $e$
|
||||
is smaller!}
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{traits} %% choose variable name
|
||||
|
||||
Only a copy constructor is required.
|
||||
|
||||
\ccConstructor{ConvexHullTraits_2(ConvexHullTraits_2& t);}{}
|
||||
|
||||
\ccOperations
|
||||
|
||||
The following member functions to create instances of the above predicate
|
||||
object types must exist.
|
||||
|
||||
\setlength\parskip{0mm}
|
||||
\ccMemberFunction{Less_xy_2 less_xy_2_object(); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_yx_2 less_yx_2_object(); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Left_of_line_2 left_of_line_2_object( const Point_2& p, const
|
||||
Point_2& q) ; }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_signed_distance_to_line_2 less_signed_distance_to_line_2_object( const Point_2& p, const Point_2& q); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_rotate_ccw_2 less_rotate_ccw_2_object( const Point_2& p )
|
||||
; }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Leftturn_2 leftturn_2_object(); }{}
|
||||
|
||||
|
||||
\ccParDims
|
||||
\ccHasModels
|
||||
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_constructive_traits_2<R>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_leda_traits_2} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_xy_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_xz_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_yz_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_rat_leda_traits_2} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_traits_2<R>} \\
|
||||
\ccAutoIndexingOn
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefConceptPage{IsStronglyConvexTraits_3}
|
||||
|
||||
\ccParDims
|
||||
\end{ccRefConcept}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Convex_hull_constructive_traits_2.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 14.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccAutoIndexingOff
|
||||
\begin{ccRefClass}{Convex_hull_constructive_traits_2<R>}
|
||||
\ccAutoIndexingOn
|
||||
\ccIndexTraitsClassBegin{Convex_hull_constructive_traits_2}{}{convex hull, 2D}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The class \ccRefName\ serves as a traits class for all the two-dimensional
|
||||
convex hull and extreme point calculation function. Unlike the class
|
||||
\ccc{CGAL::Convex_hull_traits_2<R>}, this class makes use of previously
|
||||
computed results to avoid redundancy. For example,
|
||||
in the sidedness tests, lines (of type \ccc{R::Line_2}) are constructed,
|
||||
which is equivalent to the precomputation of subdeterminants of
|
||||
the orientation-determinant for three points.
|
||||
|
||||
\ccInclude{CGAL/convex_hull_constructive_traits_2.h}
|
||||
|
||||
\ccIsModel
|
||||
|
||||
\ccRefConceptPage{ConvexHullTraits_2}%
|
||||
\ccIndexSubitem[c]{ConvexHullTraits_2}{model} \\
|
||||
|
||||
\ccTypes
|
||||
\ccAutoIndexingOff
|
||||
\ccSetThreeColumns{typedef R::Less_signed_distance_to_line_2 }{Less_signed_distance_to_line_2}{}
|
||||
\ccThreeToTwo
|
||||
|
||||
\ccTypedef{typedef R::Point_2 Point_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef R::Less_xy Less_xy_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef R::Less_yx Less_yx_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef CGAL::r_Left_of_line<R> Left_of_line_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef CGAL::r_Less_dist_to_line<R>
|
||||
Less_signed_distance_to_line_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef R::Less_rotate_ccw Less_rotate_ccw_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef R::Leftturn_2 Leftturn_2;}{}
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{traits} %% choose variable name
|
||||
|
||||
\ccConstructor{Convex_hull_constructive_traits_2();}{default constructor.}
|
||||
|
||||
\ccOperations
|
||||
\ccAutoIndexingOff
|
||||
\ccMemberFunction{Less_xy_2 less_xy_2_object(); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_yx_2 less_yx_2_object(); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Left_of_line_2
|
||||
left_of_line_2_object(const Point_2& p, const Point_2& q); }
|
||||
{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_signed_distance_to_line_2
|
||||
less_signed_distance_to_line_2_object(const Point_2& p,
|
||||
const Point_2& q); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_rotate_ccw_2
|
||||
less_rotate_ccw_2_object(const Point_2& p); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Leftturn_2 leftturn_2_object(); }{}
|
||||
\ccAutoIndexingOn
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_leda_traits_2} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_rat_leda_traits_2} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_xy_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_xz_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_yz_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_traits_2<R>}
|
||||
|
||||
\ccIndexTraitsClassEnd
|
||||
\ccAutoIndexingOff
|
||||
\end{ccRefClass}
|
||||
\ccAutoIndexingOn
|
||||
|
||||
% EOF
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Convex_hull_leda_traits_2.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 14.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccAutoIndexingOff
|
||||
\begin{ccRefClass}{Convex_hull_leda_traits_2}
|
||||
\ccAutoIndexingOn
|
||||
\ccIndexTraitsClassBegin{Convex_hull_leda_traits_2}{}{convex hull, 2D}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The class \ccRefName\ serves as a traits class for all the two-dimensional
|
||||
convex hull and extreme point calculation function. It uses the
|
||||
two-dimensional floating point geometry kernel of \leda.
|
||||
Please note that, due to the use of floating-point arithmetic, the results
|
||||
may not be robust when using this traits class.
|
||||
|
||||
\ccInclude{CGAL/convex_hull_leda_traits_2.h}
|
||||
|
||||
\ccIsModel
|
||||
|
||||
\ccRefConceptPage{ConvexHullTraits_2}%
|
||||
\ccIndexSubitem[c]{ConvexHullTraits_2}{model} \\
|
||||
|
||||
\ccTypes
|
||||
\ccAutoIndexingOff
|
||||
\ccSetThreeColumns{typedef CGAL::p_Less_dist_to_line_2p<Point_2> }{Less_signed_distance_to_line_2}{}
|
||||
\ccThreeToTwo
|
||||
|
||||
\ccTypedef{typedef leda_point Point_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef CGAL::p_Less_xy<Point_2> Less_xy_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef CGAL::p_Less_yx<Point_2> Less_yx_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef CGAL::p_Left_of_line_2p<Point_2> Left_of_line_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef CGAL::p_Less_dist_to_line_2p<Point_2>
|
||||
Less_signed_distance_to_line_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef CGAL::p_Less_rotate_ccw<Point_2> Less_rotate_ccw_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef CGAL::p_Leftturn<Point_2> Leftturn_2;}{}
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{traits} %% choose variable name
|
||||
|
||||
\ccConstructor{Convex_hull_leda_traits_2(Convex_hull_leda_traits_2& t);}{copy constructor.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
\ccAutoIndexingOff
|
||||
\ccMemberFunction{Less_xy_2 less_xy_2_object(); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_yx_2 less_yx_2_object(); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Left_of_line_2
|
||||
left_of_line_2_object(const Point_2& p, const Point_2& q); }
|
||||
{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_signed_distance_to_line_2
|
||||
less_signed_distance_to_line_2_object(const Point_2& p,
|
||||
const Point_2& q); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_rotate_ccw_2
|
||||
less_rotate_ccw_2_object(const Point_2& p); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Leftturn_2 leftturn_2_object(); }{}
|
||||
\ccAutoIndexingOn
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_constructive_traits_2<R>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_rat_leda_traits_2} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_xy_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_xz_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_yz_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_traits_2<R>}
|
||||
|
||||
\ccIndexTraitsClassEnd
|
||||
\ccAutoIndexingOff
|
||||
\end{ccRefClass}
|
||||
\ccAutoIndexingOn
|
||||
|
||||
% EOF
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Convex_hull_projective_xy_traits_2.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 14.05.2001 Susan Hert
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccAutoIndexingOff
|
||||
\begin{ccRefClass}{Convex_hull_projective_xy_traits_2<Point_3>}
|
||||
\ccAutoIndexingOn
|
||||
\ccIndexTraitsClassBegin{Convex_hull_projective_xy_traits_2}{}{convex hull, 2D}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The class \ccRefName\ serves as a traits class for all the two-dimensional
|
||||
convex hull and extreme point calculation function. This class can be
|
||||
used to compute the convex hull of a set of 3D points projected onto the
|
||||
$xy$ plane (\textit{i.e.}, by ignoring the $z$ coordinate).
|
||||
|
||||
\ccInclude{CGAL/Convex_hull_projective_xy_traits_2.h}
|
||||
|
||||
\ccIsModel
|
||||
|
||||
\ccRefConceptPage{ConvexHullTraits_2}%
|
||||
\ccIndexSubitem[c]{ConvexHullTraits_2}{model} \\
|
||||
|
||||
\ccTypes
|
||||
|
||||
\ccAutoIndexingOff
|
||||
\ccSetThreeColumns{typedef R::Less_dist_to_line_plane_xy_2<Point_3>}{Less_signed_distance_to_line_2}{}
|
||||
\ccThreeToTwo
|
||||
|
||||
\ccTypedef{typedef Point_3 Point_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Less_xy_plane_xy_2<Point_3> Less_xy_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Less_yx_plane_xy_2<Point_3> Less_yx_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Left_of_line_plane_xy_2<Point_3> Left_of_line_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Less_dist_to_line_plane_xy_2<Point_3>
|
||||
Less_signed_distance_to_line_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Less_rotate_ccw_plane_xy_2<Point_3> Less_rotate_ccw_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Leftturn_plane_xy_2<Point_3> Leftturn_2;}{}
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{traits} %% choose variable name
|
||||
|
||||
\ccConstructor{Convex_hull_projective_xy_traits_2();}{default constructor.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
\ccMemberFunction{Less_xy_2 less_xy_2_object(); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_yx_2 less_yx_2_object(); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Left_of_line_2
|
||||
left_of_line_2_object(const Point_2& p, const Point_2& q); }
|
||||
{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_signed_distance_to_line_2
|
||||
less_signed_distance_to_line_2_object(const Point_2& p,
|
||||
const Point_2& q); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_rotate_ccw_2
|
||||
less_rotate_ccw_2_object(const Point_2& p); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Leftturn_2 leftturn_2_object(); }{}
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_constructive_traits_2<R>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_leda_traits_2} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_xz_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_yz_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_rat_leda_traits_2} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_traits_2<R>}
|
||||
|
||||
\ccIndexTraitsClassEnd
|
||||
\ccAutoIndexingOff
|
||||
\end{ccRefClass}
|
||||
\ccAutoIndexingOn
|
||||
|
||||
% EOF
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Convex_hull_projective_xz_traits_2.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 14.05.2001 Susan Hert
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccAutoIndexingOff
|
||||
\begin{ccRefClass}{Convex_hull_projective_xz_traits_2<Point_3>}
|
||||
\ccAutoIndexingOn
|
||||
\ccIndexTraitsClassBegin{Convex_hull_projective_xz_traits_2}{}{convex hull, 2D}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The class \ccRefName\ serves as a traits class for all the two-dimensional
|
||||
convex hull and extreme point calculation function. This class can be
|
||||
used to compute the convex hull of a set of 3D points projected onto the
|
||||
$xz$ plane (\textit{i.e.}, by ignoring the $y$ coordinate).
|
||||
|
||||
\ccInclude{CGAL/Convex_hull_projective_xz_traits_2.h}
|
||||
|
||||
\ccIsModel
|
||||
|
||||
\ccRefConceptPage{ConvexHullTraits_2}%
|
||||
\ccIndexSubitem[c]{ConvexHullTraits_2}{model} \\
|
||||
|
||||
\ccTypes
|
||||
\ccAutoIndexingOff
|
||||
\ccSetThreeColumns{typedef R::Less_dist_to_line_plane_xy_2<Point_3>}{Less_signed
|
||||
_distance_to_line_2}{}
|
||||
\ccThreeToTwo
|
||||
|
||||
\ccTypedef{typedef Point_3 Point_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Less_xy_plane_xz_2<Point_3> Less_xy_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Less_yx_plane_xz_2<Point_3> Less_yx_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Left_of_line_plane_xz_2<Point_3> Left_of_line_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Less_dist_to_line_plane_xz_2<Point_3>
|
||||
Less_signed_distance_to_line_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Less_rotate_ccw_plane_xz_2<Point_3> Less_rotate_ccw_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Leftturn_plane_xz_2<Point_3> Leftturn_2;}{}
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{traits} %% choose variable name
|
||||
|
||||
\ccConstructor{Convex_hull_projective_xz_traits_2();}{default constructor.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
\ccMemberFunction{Less_xy_2 less_xy_2_object(); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_yx_2 less_yx_2_object(); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Left_of_line_2
|
||||
left_of_line_2_object(const Point_2& p, const Point_2& q); }
|
||||
{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_signed_distance_to_line_2
|
||||
less_signed_distance_to_line_2_object(const Point_2& p,
|
||||
const Point_2& q); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_rotate_ccw_2
|
||||
less_rotate_ccw_2_object(const Point_2& p); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Leftturn_2 leftturn_2_object(); }{}
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_constructive_traits_2<R>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_leda_traits_2} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_xy_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_yz_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_rat_leda_traits_2} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_traits_2<R>}
|
||||
|
||||
\ccIndexTraitsClassEnd
|
||||
\ccAutoIndexingOff
|
||||
\end{ccRefClass}
|
||||
\ccAutoIndexingOn
|
||||
|
||||
% EOF
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Convex_hull_projective_yz_traits.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 14.05.2001 Susan Hert
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccAutoIndexingOff
|
||||
\begin{ccRefClass}{Convex_hull_projective_yz_traits_2<Point_3>}
|
||||
\ccAutoIndexingOn
|
||||
\ccIndexTraitsClassBegin{Convex_hull_projective_yz_traits_2}{}{convex hull, 2D}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The class \ccRefName\ serves as a traits class for all the two-dimensional
|
||||
convex hull and extreme point calculation function. This class can be
|
||||
used to compute the convex hull of a set of 3D points projected onto the
|
||||
$yz$ plane (\textit{i.e.}, by ignoring the $x$ coordinate).
|
||||
|
||||
\ccInclude{CGAL/Convex_hull_projective_yz_traits_2.h}
|
||||
|
||||
\ccIsModel
|
||||
|
||||
\ccRefConceptPage{ConvexHullTraits_2}%
|
||||
\ccIndexSubitem[c]{ConvexHullTraits_2}{model} \\
|
||||
|
||||
\ccTypes
|
||||
\ccAutoIndexingOff
|
||||
\ccSetThreeColumns{typedef R::Less_dist_to_line_plane_xy_2<Point_3>}{Less_signed
|
||||
_distance_to_line_2}{}
|
||||
\ccThreeToTwo
|
||||
|
||||
\ccTypedef{typedef Point_3 Point_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Less_xy_plane_yz_2<Point_3> Less_xy_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Less_yx_plane_yz_2<Point_3> Less_yx_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Left_of_line_plane_yz_2<Point_3> Left_of_line_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Less_dist_to_line_plane_yz_2<Point_3>
|
||||
Less_signed_distance_to_line_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Less_rotate_ccw_plane_yz_2<Point_3> Less_rotate_ccw_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Leftturn_plane_yz_2<Point_3> Leftturn_2;}{}
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{traits} %% choose variable name
|
||||
|
||||
\ccConstructor{Convex_hull_projective_yz_traits_2();}{default constructor.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
\ccMemberFunction{Less_xy_2 less_xy_2_object(); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_yx_2 less_yx_2_object(); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Left_of_line_2
|
||||
left_of_line_2_object(const Point_2& p, const Point_2& q); }
|
||||
{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_signed_distance_to_line_2
|
||||
less_signed_distance_to_line_2_object(const Point_2& p,
|
||||
const Point_2& q); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_rotate_ccw_2
|
||||
less_rotate_ccw_2_object(const Point_2& p); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Leftturn_2 leftturn_2_object(); }{}
|
||||
\ccAutoIndexingOn
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_constructive_traits_2<R>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_leda_traits_2} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_xz_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_xy_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_rat_leda_traits_2} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_traits_2<R>}
|
||||
|
||||
\ccIndexTraitsClassEnd
|
||||
\ccAutoIndexingOff
|
||||
\end{ccRefClass}
|
||||
\ccAutoIndexingOn
|
||||
|
||||
% EOF
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Convex_hull_rat_leda_traits_2.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 14.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccAutoIndexingOff
|
||||
\begin{ccRefClass}{Convex_hull_rat_leda_traits_2}
|
||||
\ccAutoIndexingOn
|
||||
\ccIndexTraitsClassBegin{Convex_hull_rat_leda_traits_2}{}{convex hull, 2D}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The class \ccRefName\ serves as a traits class for all the two-dimensional
|
||||
convex hull and extreme point calculation function. It uses the
|
||||
two-dimensional exact rational geometry kernel of \leda. The usage of this
|
||||
traits class is not recommended with \ccc{ch_eddy()} for \leda\ versions prior
|
||||
to 3.6. Older versions of \leda\ do
|
||||
not provide appropriate efficient predicates for this function.
|
||||
|
||||
\ccInclude{CGAL/convex_hull_rat_leda_traits_2.h}
|
||||
|
||||
\ccIsModel
|
||||
|
||||
\ccRefConceptPage{ConvexHullTraits_2}%
|
||||
\ccIndexSubitem[c]{ConvexHullTraits_2}{model} \\
|
||||
|
||||
\ccTypes
|
||||
\ccAutoIndexingOff
|
||||
\ccSetThreeColumns{typedef CGAL::p_Less_signed_distance_to_line_2 }{Less_signed_distance_to_line_2}{}
|
||||
\ccThreeToTwo
|
||||
|
||||
\ccTypedef{typedef leda_rat_point Point_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef CGAL::p_Less_xy<Point_2> Less_xy_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef CGAL::p_Less_yx<Point_2> Less_yx_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef CGAL::p_Left_of_line_2p<Point_2> Left_of_line_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef CGAL::p_Less_dist_to_line_2p<Point_2>
|
||||
Less_signed_distance_to_line_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef CGAL::p_Less_rotate_ccw<Point_2> Less_rotate_ccw_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef CGAL::p_Leftturn<Point_2> Leftturn_2;}{}
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{traits} %% choose variable name
|
||||
|
||||
\ccConstructor{Convex_hull_rat_leda_traits_2(Convex_hull_rat_leda_traits_2& t);}{copy constructor.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
\ccAutoIndexingOff
|
||||
\ccMemberFunction{Less_xy_2 less_xy_2_object(); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_yx_2 less_yx_2_object(); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Left_of_line_2
|
||||
left_of_line_2_object(const Point_2& p, const Point_2& q); }
|
||||
{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_signed_distance_to_line_2
|
||||
less_signed_distance_to_line_2_object(const Point_2& p,
|
||||
const Point_2& q); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_rotate_ccw_2
|
||||
less_rotate_ccw_2_object(const Point_2& p); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Leftturn_2 leftturn_2_object(); }{}
|
||||
\ccAutoIndexingOn
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_constructive_traits_2<R>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_leda_traits_2} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_xy_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_xz_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_yz_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_traits_2<R>}
|
||||
|
||||
\ccIndexTraitsClassEnd
|
||||
\ccAutoIndexingOff
|
||||
\end{ccRefClass}
|
||||
\ccAutoIndexingOn
|
||||
|
||||
% EOF
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Convex_hull_traits_2.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 14.05.2001 Susan Hert
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccAutoIndexingOff
|
||||
\begin{ccRefClass}{Convex_hull_traits_2<R>}
|
||||
\ccAutoIndexingOn
|
||||
\ccIndexTraitsClassBegin{Convex_hull_traits_2}{}{convex hull, 2D}
|
||||
\ccIndexTraitsClassDefault[p]{convex hull, 2D}
|
||||
\ccIndexTraitsClassDefault[p]{extreme points, 2D}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The class \ccRefName\ serves as a traits class for all the two-dimensional
|
||||
convex hull and extreme point calculation function. This class corresponds
|
||||
to the default traits class for these functions.
|
||||
|
||||
\ccInclude{CGAL/convex_hull_traits_2.h}
|
||||
|
||||
\ccIsModel
|
||||
|
||||
\ccRefConceptPage{ConvexHullTraits_2}%
|
||||
\ccIndexSubitem[c]{ConvexHullTraits_2}{model} \\
|
||||
|
||||
\ccTypes
|
||||
\ccAutoIndexingOff
|
||||
\ccSetThreeColumns{typedef R::Less_signed_distance_to_line_2 }{Less_signed_distance_to_line_2}{}
|
||||
\ccThreeToTwo
|
||||
|
||||
\ccTypedef{typedef R::Point_2 Point_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef R::Less_xy Less_xy_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef R::Less_yx Less_yx_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef R::Left_of_line_2 Left_of_line_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef R::Less_signed_distance_to_line_2
|
||||
Less_signed_distance_to_line_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef R::Less_rotate_ccw_2 Less_rotate_ccw_2;}{}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef R::Leftturn_2 Leftturn_2;}{}
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{traits} %% choose variable name
|
||||
|
||||
\ccConstructor{Convex_hull_traits_2(Convex_hull_traits_2& t);}%
|
||||
{copy constructor.}
|
||||
|
||||
\ccOperations
|
||||
\ccAutoIndexingOff
|
||||
\ccMemberFunction{Less_xy_2 less_xy_2_object(); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_yx_2 less_yx_2_object(); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Left_of_line_2
|
||||
left_of_line_2_object(const Point_2& p, const Point_2& q); }
|
||||
{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_signed_distance_to_line_2
|
||||
less_signed_distance_to_line_2_object(const Point_2& p,
|
||||
const Point_2& q); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Less_rotate_ccw_2
|
||||
less_rotate_ccw_2_object(const Point_2& p); }{}
|
||||
\ccGlue
|
||||
\ccMemberFunction{Leftturn_2 leftturn_2_object(); }{}
|
||||
\ccAutoIndexingOn
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_constructive_traits_2<R>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_leda_traits_2} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_xy_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_xz_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_yz_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_rat_leda_traits_2}
|
||||
|
||||
\ccIndexTraitsClassEnd
|
||||
\ccAutoIndexingOff
|
||||
\end{ccRefClass}
|
||||
\ccAutoIndexingOn
|
||||
|
||||
% EOF
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ch_akl_toussaint.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%\renewcommand{\ccRefPageBegin}{\begin{ccAdvanced}}
|
||||
%\renewcommand{\ccRefPageEnd}{\end{ccAdvanced}}
|
||||
\begin{ccRefFunction}{ch_akl_toussaint} %% add template arg's if necessary
|
||||
\ccIndexSubitemBegin{convex hull, 2D}{Akl-Toussaint algorithm}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ generates the counterclockwise sequence of extreme
|
||||
points from a given set of input points.
|
||||
|
||||
|
||||
\ccInclude{CGAL/ch_akl_toussiant.h}
|
||||
|
||||
\ccFunction{template <class ForwardIterator, class OutputIterator, class Traits>
|
||||
OutputIterator
|
||||
ch_akl_toussaint(ForwardIterator first, ForwardIterator beyond,
|
||||
OutputIterator result,
|
||||
const Traits& ch_traits = Default_traits());}
|
||||
{generates the counterclockwise sequence of extreme points
|
||||
of the points in the range [\ccc{first},\ccc{beyond}).
|
||||
The resulting sequence is placed starting at position
|
||||
\ccc{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.
|
||||
\ccPrecond %\ccIndexSubitem[C]{ch_akl_toussaint}{preconditions}
|
||||
The source range [\ccc{first},\ccc{beyond}) does not contain
|
||||
\ccc{result}.}
|
||||
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{ForwardIteartor::value_type} is defined.
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\begin{enumerate}
|
||||
\item \ccc{ForwardIterator::value_type} and
|
||||
\ccc{OutputIterator::value_type}
|
||||
are equivalent to \ccc{Traits::Point_2}.
|
||||
\item \ccc{Traits} defines the following subset of types from
|
||||
the concept ConvexHullTraits\_2 and their corresponding member
|
||||
%\ccIndexMainItem[c]{ConvexHullTraits_2}
|
||||
functions that return instances of these types:
|
||||
\begin{itemize}
|
||||
\item \ccc{Traits::Point_2},
|
||||
\item \ccc{Traits::Less_xy_2},
|
||||
\item \ccc{Traits::Less_yx_2},
|
||||
\item \ccc{Traits::Left_of_line_2},
|
||||
\item \ccc{Traits::Leftturn_2}.
|
||||
\end{itemize}
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_bykat} \\
|
||||
\ccRefIdfierPage{CGAL::ch_eddy} \\
|
||||
\ccRefIdfierPage{CGAL::ch_graham_andrew} \\
|
||||
\ccRefIdfierPage{CGAL::ch_jarvis} \\
|
||||
\ccRefIdfierPage{CGAL::ch_melkman} \\
|
||||
\ccRefIdfierPage{CGAL::convex_hull_2}
|
||||
|
||||
\ccImplementation
|
||||
|
||||
This function uses the algorithm of Akl and
|
||||
Toussaint \cite{at-fcha-78} that requires $O(n \log n)$ time for $n$ input
|
||||
points.
|
||||
|
||||
\ccIndexSubitemEnd{convex hull, 2D}{Akl-Toussaint algorithm}
|
||||
\end{ccRefFunction}
|
||||
%\renewcommand{\ccRefPageBegin}{}
|
||||
%\renewcommand{\ccRefPageEnd}{}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ch_bykat.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%\renewcommand{\ccRefPageBegin}{\begin{ccAdvanced}}
|
||||
%\renewcommand{\ccRefPageEnd}{\end{ccAdvanced}}
|
||||
\begin{ccRefFunction}{ch_bykat}
|
||||
\ccIndexSubitemBegin{convex hull, 2D}{Bykat algorithm}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ generates the counterclockwise sequence of extreme
|
||||
points from a given set of input points.
|
||||
|
||||
|
||||
\ccInclude{CGAL/ch_bykat.h}
|
||||
|
||||
\ccFunction{template <class InputIterator, class OutputIterator, class Traits>
|
||||
OutputIterator
|
||||
ch_bykat( InputIterator first,
|
||||
InputIterator beyond,
|
||||
OutputIterator result,
|
||||
const Traits & ch_traits = Default_traits);}
|
||||
{generates the counterclockwise sequence of extreme points
|
||||
of the points in the range [\ccc{first},\ccc{beyond}).
|
||||
The resulting sequence is placed starting at position
|
||||
\ccc{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.
|
||||
\ccPrecond %\ccIndexSubitem[C]{ch_bykat}{preconditions}
|
||||
The source range [\ccc{first},\ccc{beyond}) does not contain
|
||||
\ccc{result}.}
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{ForwardIteartor::value_type} is defined.
|
||||
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\begin{enumerate}
|
||||
\item \ccc{InputIterator::value_type} and
|
||||
\ccc{OutputIterator::value_type}
|
||||
are equivalent to \ccc{Traits::Point_2}.
|
||||
\item \ccc{Traits} defines the following subset of types from
|
||||
the concept ConvexHullTraits\_2 and their corresponding member
|
||||
%\ccIndexMainItem[c]{ConvexHullTraits_2}
|
||||
functions that return instances of these types:
|
||||
\begin{itemize}
|
||||
\item \ccc{Traits::Point_2},
|
||||
\item \ccc{Traits::Less_signed_distance_to_line_2},
|
||||
\item \ccc{Traits::Left_of_line_2},
|
||||
\item \ccc{Traits::Less_xy_2}.
|
||||
\end{itemize}
|
||||
\end{enumerate}
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_akl_toussaint} \\
|
||||
\ccRefIdfierPage{CGAL::ch_eddy} \\
|
||||
\ccRefIdfierPage{CGAL::ch_graham_andrew} \\
|
||||
\ccRefIdfierPage{CGAL::ch_jarvis} \\
|
||||
\ccRefIdfierPage{CGAL::ch_melkman} \\
|
||||
\ccRefIdfierPage{CGAL::convex_hull_2}
|
||||
|
||||
\ccImplementation
|
||||
This function implements the non-recursive varitaion of
|
||||
Eddy's algorithm \cite{e-nchap-77} described in \cite{b-chfsp-78}.
|
||||
This algorithm requires $O(n h)$ time
|
||||
in the worst case for $n$ input points with $h$ extreme points.
|
||||
|
||||
\ccIndexSubitemEnd{convex hull, 2D}{Bykat algorithm}
|
||||
\end{ccRefFunction}
|
||||
%\renewcommand{\ccRefPageBegin}{}
|
||||
%\renewcommand{\ccRefPageEnd}{}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ch_e_point.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefFunction}{ch_e_point} %% add template arg's if necessary
|
||||
\ccIndexSubitemBegin{extreme points, 2D}{in coordinate directions}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ finds a point of a given set
|
||||
of input points with maximal $x$ coordinate.
|
||||
|
||||
\ccInclude{CGAL/ch_selected_extreme_points_2.h}
|
||||
|
||||
\ccFunction{template <class ForwardIterator>
|
||||
void
|
||||
ch_e_point( ForwardIterator first, ForwardIterator beyond,
|
||||
ForwardIterator& e,
|
||||
const Traits & ch_traits = Default_traits);}
|
||||
{traverses the range [\ccc{first},\ccc{beyond}).
|
||||
After execution, the value of
|
||||
\ccc{e} is an iterator in the range such that \ccc{*e} $\ge_{xy}$
|
||||
\ccc{*it} for all iterators \ccc{it} in the range. }
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{ForwardIteartor::value_type} is defined.
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\ccc{Traits} defines a type \ccc{Traits::Less_xy_2} as described in
|
||||
the concept ConvexHullTraits\_2 and the corresponding member
|
||||
%\ccIndexMainItem[c]{ConvexHullTraits_2}
|
||||
function that returns an instance of this type.
|
||||
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_nswe_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_n_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_ns_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_s_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_w_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_we_point}
|
||||
|
||||
\ccIndexSubitemEnd{extreme points, 2D}{in coordinate directions}
|
||||
\end{ccRefFunction}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ch_eddy.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%\renewcommand{\ccRefPageBegin}{\begin{ccAdvanced}}
|
||||
%\renewcommand{\ccRefPageEnd}{\end{ccAdvanced}}
|
||||
\begin{ccRefFunction}{ch_eddy} %% add template arg's if necessary
|
||||
\ccIndexSubitemBegin{convex hull, 2D}{Eddy algorithm}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ generates the counterclockwise sequence of extreme
|
||||
points from a given set of input points.
|
||||
|
||||
|
||||
\ccInclude{CGAL/ch_eddy.h}
|
||||
|
||||
\ccFunction{template <class InputIterator, class OutputIterator, class Traits>
|
||||
OutputIterator
|
||||
ch_eddy( InputIterator first,
|
||||
InputIterator beyond,
|
||||
OutputIterator result,
|
||||
const Traits & ch_traits = Default_traits);}
|
||||
{generates the counterclockwise sequence of extreme points
|
||||
of the points in the range [\ccc{first},\ccc{beyond}).
|
||||
The resulting sequence is placed starting at position
|
||||
\ccc{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.
|
||||
\ccPrecond %\ccIndexSubitem[C]{ch_eddy}{preconditions}
|
||||
The source range [\ccc{first},\ccc{beyond}) does not contain
|
||||
\ccc{result}.}
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{ForwardIteartor::value_type} is defined.
|
||||
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\begin{enumerate}
|
||||
\item \ccc{InputIterator::value_type} and
|
||||
\ccc{OutputIterator::value_type}
|
||||
are equivalent to \ccc{Traits::Point_2}.
|
||||
\item \ccc{Traits} defines the following subset of types from
|
||||
the concept ConvexHullTraits\_2 and their corresponding member
|
||||
%\ccIndexMainItem[c]{ConvexHullTraits_2}
|
||||
functions that return instances of these types:
|
||||
\begin{itemize}
|
||||
\item \ccc{Traits::Point_2},
|
||||
\item \ccc{Traits::Less_signed_distance_to_line_2},
|
||||
\item \ccc{Traits::Left_of_line_2},
|
||||
\item \ccc{Traits::Less_xy_2}.
|
||||
\end{itemize}
|
||||
\end{enumerate}
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_akl_toussaint} \\
|
||||
\ccRefIdfierPage{CGAL::ch_bykat} \\
|
||||
\ccRefIdfierPage{CGAL::ch_graham_andrew} \\
|
||||
\ccRefIdfierPage{CGAL::ch_jarvis} \\
|
||||
\ccRefIdfierPage{CGAL::ch_melkman} \\
|
||||
\ccRefIdfierPage{CGAL::convex_hull_2}
|
||||
|
||||
\ccImplementation
|
||||
|
||||
This function implements Eddy's algorithm
|
||||
\cite{e-nchap-77}, which is the two-dimensional version of the quickhull
|
||||
algorithm \cite{bdh-qach-96}%
|
||||
\ccIndexMainItem{quickhull, 2D}
|
||||
\ccIndexSubitem{convex hull, 2D}{quickhull}.
|
||||
This algorithm requires $O(n h)$ time
|
||||
in the worst case for $n$ input points with $h$ extreme points.
|
||||
|
||||
\ccIndexSubitemEnd{convex hull, 2D}{Eddy algorithm}
|
||||
\end{ccRefFunction}
|
||||
%\renewcommand{\ccRefPageBegin}{}
|
||||
%\renewcommand{\ccRefPageEnd}{}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ch_graham_andrew.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%\renewcommand{\ccRefPageBegin}{\begin{ccAdvanced}}
|
||||
%\renewcommand{\ccRefPageEnd}{\end{ccAdvanced}}
|
||||
\begin{ccRefFunction}{ch_graham_andrew} %% add template arg's if necessary
|
||||
\ccIndexSubitemBegin{convex hull, 2D}{Graham-Andrew scan}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ generates the counterclockwise sequence of extreme
|
||||
points from a given set of input points.
|
||||
|
||||
|
||||
\ccInclude{CGAL/ch_graham_andrew.h}
|
||||
|
||||
\ccFunction{template <class InputIterator, class OutputIterator, class Traits>
|
||||
OutputIterator
|
||||
ch_graham_andrew( InputIterator first,
|
||||
InputIterator beyond,
|
||||
OutputIterator result,
|
||||
const Traits & ch_traits = Default_traits);}
|
||||
{generates the counterclockwise sequence of extreme points
|
||||
of the points in the range [\ccc{first},\ccc{beyond}).
|
||||
The resulting sequence is placed starting at position
|
||||
\ccc{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.
|
||||
\ccPrecond %\ccIndexSubitem[C]{ch_graham_andrew}{preconditions}
|
||||
The source range [\ccc{first},\ccc{beyond}) does not contain
|
||||
\ccc{result}.}
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{InputIteartor::value_type} is defined.
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\begin{enumerate}
|
||||
\item \ccc{InputIterator::value_type} and
|
||||
\ccc{OutputIterator::value_type}
|
||||
are equivalent to \ccc{Traits::Point_2}.
|
||||
\item \ccc{Traits} defines the following subset of types from
|
||||
the concept ConvexHullTraits\_2 and their corresponding member
|
||||
%\ccIndexMainItem[c]{ConvexHullTraits_2}
|
||||
functions that return instances of these types:
|
||||
\begin{itemize}
|
||||
\item \ccc{Traits::Point_2},
|
||||
\item \ccc{Traits::Less_xy_2},
|
||||
\item \ccc{Traits::Leftturn_2}.
|
||||
\end{itemize}
|
||||
\end{enumerate}
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_akl_toussaint} \\
|
||||
\ccRefIdfierPage{CGAL::ch_bykat} \\
|
||||
\ccRefIdfierPage{CGAL::ch_eddy} \\
|
||||
\ccRefIdfierPage{CGAL::ch_graham_andrew_scan} \\
|
||||
\ccRefIdfierPage{CGAL::ch_jarvis} \\
|
||||
\ccRefIdfierPage{CGAL::ch_melkman} \\
|
||||
\ccRefIdfierPage{CGAL::convex_hull_2} \\
|
||||
\ccRefIdfierPage{CGAL::lower_hull_points_2} \\
|
||||
\ccRefIdfierPage{CGAL::upper_hull_points_2}
|
||||
|
||||
\ccImplementation
|
||||
This function implements Andrew's variant of the Graham
|
||||
scan algorithm \cite{a-aeach-79} and follows the presenation of Mehlhorn
|
||||
\cite{m-mdscg-84}. This algorithm requires $O(n \log n)$ time
|
||||
in the worst case for $n$ input points.
|
||||
|
||||
\ccIndexSubitemEnd{convex hull, 2D}{Graham-Andrew scan}
|
||||
\end{ccRefFunction}
|
||||
%\renewcommand{\ccRefPageBegin}{}
|
||||
%\renewcommand{\ccRefPageEnd}{}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ch_graham_andrew.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefFunction}{ch_graham_andrew_scan} %% add template arg's if necessary
|
||||
\ccIndexSubitemBegin{convex hull, 2D}{Graham-Andrew scan}
|
||||
\ccIndexSubitemBegin{extreme points, 2D}{right of line}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ 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.
|
||||
|
||||
|
||||
\ccInclude{CGAL/ch_graham_andrew.h}
|
||||
|
||||
\ccFunction{template <class BidirectionalIterator, class OutputIterator,
|
||||
class Traits>
|
||||
OutputIterator
|
||||
ch_graham_andrew_scan( BidirectionalIterator first,
|
||||
BidirectionalIterator beyond,
|
||||
OutputIterator result,
|
||||
const Traits& ch_traits = Default_traits);}
|
||||
{generates the counterclockwise sequence of extreme points that are
|
||||
not left of $pq$, where $p$ is the value of \ccc{first} and $q$ is
|
||||
the value of \ccc{beyond} $-1$. The resulting sequence is placed
|
||||
starting at \ccc{result} with $p$; point $q$ is omitted. The
|
||||
past-the-end iterator for the sequence is returned.
|
||||
\ccPrecond %\ccIndexSubitem[C]{ch_graham_andrew_scan}{preconditions}
|
||||
The range [\ccc{first},\ccc{beyond}) contains at least
|
||||
two different points.
|
||||
The points in [\ccc{first},\ccc{beyond}) are ``sorted'' with respect
|
||||
to $pq$, {\it i.e.}, the sequence of points in
|
||||
[\ccc{first},\ccc{beyond}) define a counterclockwise polygon,
|
||||
for which the Graham-Sklansky-procedure \cite{s-mcrm-72} works.}
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{BidirectionalIterator::value_type} is defined.
|
||||
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\begin{enumerate}
|
||||
\item \ccc{BidirectionalIterator::value_type} and
|
||||
\ccc{OutputIterator::value_type}
|
||||
are equivalent to \ccc{Traits::Point_2}.
|
||||
\item \ccc{Traits} defines the following two types from
|
||||
the concept ConvexHullTraits\_2 and their corresponding member
|
||||
%\ccIndexMainItem[c]{ConvexHullTraits_2}
|
||||
functions that return instances of these types:
|
||||
\begin{itemize}
|
||||
\item \ccc{Traits::Point_2},
|
||||
\item \ccc{Traits::Leftturn_2}.
|
||||
\end{itemize}
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_graham_andrew} \\
|
||||
\ccRefIdfierPage{CGAL::lower_hull_points_2} \\
|
||||
\ccRefIdfierPage{CGAL::upper_hull_points_2}
|
||||
|
||||
\ccImplementation
|
||||
|
||||
The function uses Andrew's
|
||||
variant of the Graham scan algorithm \cite{a-aeach-79} . This algorithm
|
||||
requires $O(n \log n)$ time in the worst case for $n$ input points.
|
||||
|
||||
\ccExample
|
||||
|
||||
In the following example \ccc{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 \ccc{Less_rotate_ccw_2} predicate, as defined in
|
||||
the concept ConvexHullTraits\_2. According to the definition
|
||||
of \ccc{Less_rotate_ccw_2}, the leftmost point is the last point in the sorted
|
||||
sequence and its predecessor on the convex hull is the first point in the
|
||||
sorted sequence. It is not hard to see that the preconditions of
|
||||
\ccc{ch_graham_andrew_scan()} are satisfied. Anderson's variant of the
|
||||
Graham scan is usually inferior to Andrew's variant because of its higher
|
||||
arithmetic demand.
|
||||
|
||||
\begin{verbatim}
|
||||
template <class InputIterator, class OutputIterator, class Traits>
|
||||
OutputIterator
|
||||
ch_graham_anderson( InputIterator first, InputIterator beyond,
|
||||
OutputIterator result, const Traits& ch_traits)
|
||||
{
|
||||
typedef typename Traits::Less_xy_2 Less_xy_2;
|
||||
typedef typename Traits::Point_2 Point_2;
|
||||
typedef typename Traits::Less_rotate_ccw_2 Less_rotate_ccw_2;
|
||||
|
||||
if (first == beyond) return result;
|
||||
std::vector< Point_2 > V;
|
||||
copy( first, beyond, back_inserter(V) );
|
||||
typename std::vector< Point_2 >::iterator it =
|
||||
std::min_element(V.begin(), V.end(), Less_xy_2());
|
||||
std::sort( V.begin(), V.end(), Less_rotate_ccw_2(*it) );
|
||||
if ( *(V.begin()) == *(V.rbegin()) )
|
||||
{
|
||||
*result = *(V.begin()); ++result;
|
||||
return result;
|
||||
}
|
||||
return ch_graham_andrew_scan( V.begin(), V.end(), result, ch_traits);
|
||||
}
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
\ccIndexSubitemEnd{convex hull, 2D}{Graham-Andrew scan}
|
||||
\ccIndexSubitemEnd{extreme points, 2D}{right of line}
|
||||
\end{ccRefFunction}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ch_jarvis.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%\renewcommand{\ccRefPageBegin}{\begin{ccAdvanced}}
|
||||
%\renewcommand{\ccRefPageEnd}{\end{ccAdvanced}}
|
||||
\begin{ccRefFunction}{ch_jarvis} %% add template arg's if necessary
|
||||
\ccIndexSubitemBegin{convex hull, 2D}{Jarvis march}
|
||||
\ccIndexSubitemBegin{convex hull, 2D}{gift-wrapping}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ generates the counterclockwise sequence of extreme
|
||||
points from a given set of input points.
|
||||
|
||||
|
||||
\ccInclude{CGAL/ch_jarvis.h}
|
||||
|
||||
\ccFunction{template <class InputIterator, class OutputIterator, class Traits>
|
||||
OutputIterator
|
||||
ch_jarvis( InputIterator first,
|
||||
InputIterator beyond,
|
||||
OutputIterator result,
|
||||
const Traits & ch_traits = Default_traits);}
|
||||
{generates the counterclockwise sequence of extreme points
|
||||
of the points in the range [\ccc{first},\ccc{beyond}).
|
||||
The resulting sequence is placed starting at position
|
||||
\ccc{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.
|
||||
\ccPrecond %\ccIndexSubitem[C]{ch_jarvis}{preconditions}
|
||||
The source range [\ccc{first},\ccc{beyond}) does not contain
|
||||
\ccc{result}.}
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{InputIterator::value_type} is defined.
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\begin{enumerate}
|
||||
\item \ccc{InputIterator::value_type} and
|
||||
\ccc{OutputIterator::value_type}
|
||||
are equivalent to \ccc{Traits::Point_2}.
|
||||
\item \ccc{Traits} defines the following subset of types from
|
||||
the concept ConvexHullTraits\_2 and their corresponding member
|
||||
%\ccIndexMainItem[c]{ConvexHullTraits_2}
|
||||
functions that return instances of these types:
|
||||
\begin{itemize}
|
||||
\item \ccc{Traits::Point_2},
|
||||
\item \ccc{Traits::Less_rotate_ccw_2},
|
||||
\item \ccc{Traits::Less_xy_2}.
|
||||
\end{itemize}
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_akl_toussaint} \\
|
||||
\ccRefIdfierPage{CGAL::ch_bykat} \\
|
||||
\ccRefIdfierPage{CGAL::ch_eddy} \\
|
||||
\ccRefIdfierPage{CGAL::ch_graham_andrew} \\
|
||||
\ccRefIdfierPage{CGAL::ch_jarvis_march} \\
|
||||
\ccRefIdfierPage{CGAL::ch_melkman} \\
|
||||
\ccRefIdfierPage{CGAL::convex_hull_2}
|
||||
|
||||
\ccIndexSubitemEnd{convex hull, 2D}{gift-wrapping}
|
||||
\ccIndexSubitemEnd{convex hull, 2D}{Jarvis march}
|
||||
|
||||
\ccImplementation
|
||||
This function uses the Jarvis march (gift-wrapping)
|
||||
algorithm \cite{j-ichfs-73}. This algorithm requires $O(n h)$ time
|
||||
in the worst case for $n$ input points with $h$ extreme points.
|
||||
|
||||
\end{ccRefFunction}
|
||||
%\renewcommand{\ccRefPageBegin}{}
|
||||
%\renewcommand{\ccRefPageEnd}{}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ch_jarvis_march.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\begin{ccRefFunction}{ch_jarvis_march} %% add template arg's if necessary
|
||||
\ccIndexSubitemBegin{convex hull, 2D}{Jarvis march}
|
||||
\ccIndexSubitemBegin{convex hull, 2D}{gift-wrapping}
|
||||
\ccIndexSubitemBegin{extreme points, 2D}{between two points}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ generates the counterclockwise sequence of extreme
|
||||
points from a given set of input points that line between two input points.
|
||||
|
||||
|
||||
\ccInclude{CGAL/ch_jarvis.h}
|
||||
|
||||
\ccFunction{template <class ForwardIterator, class OutputIterator, class Traits>
|
||||
OutputIterator
|
||||
ch_jarvis_march(ForwardIterator first, ForwardIterator beyond,
|
||||
const Traits::Point_2& start_p,
|
||||
const Traits::Point_2& stop_p,
|
||||
OutputIterator result,
|
||||
const Traits& ch_traits = Default_traits);}
|
||||
{generates the counterclockwise subsequence of
|
||||
extreme points between \ccc{start_p} and \ccc{stop_p} of the
|
||||
points in the range [\ccc{first},\ccc{beyond}), starting at
|
||||
position \ccc{result} with point \ccc{start_p}. The last point
|
||||
generated is the point preceding \ccc{stop_p} in the
|
||||
counterclockwise order of extreme points.\\
|
||||
\ccPrecond%\ccIndexSubitem[C]{ch_jarvis_march}{preconditions}
|
||||
\ccc{start_p} and \ccc{stop_p} are extreme points with respect to
|
||||
the points in the range [\ccc{first},\ccc{beyond}) and \ccc{stop_p}
|
||||
is an element of range [\ccc{first},\ccc{beyond}).}
|
||||
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{ForwardIterator::value_type} is defined.
|
||||
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\begin{enumerate}
|
||||
\item \ccc{ForwardIterator::value_type} and
|
||||
\ccc{OutputIterator::value_type}
|
||||
are equivalent to \ccc{Traits::Point_2}.
|
||||
\item \ccc{Traits} defines the following subset of types from
|
||||
the concept ConvexHullTraits\_2 and their corresponding member
|
||||
%\ccIndexMainItem[c]{ConvexHullTraits_2}
|
||||
functions that return instances of these types:
|
||||
\begin{itemize}
|
||||
\item \ccc{Traits::Point_2},
|
||||
\item \ccc{Traits::Less_rotate_ccw_2}.
|
||||
\end{itemize}
|
||||
\end{enumerate}
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_jarvis} \\
|
||||
\ccRefIdfierPage{CGAL::lower_hull_points_2} \\
|
||||
\ccRefIdfierPage{CGAL::upper_hull_points_2} \\
|
||||
|
||||
\ccIndexSubitemEnd{convex hull, 2D}{Jarvis march}
|
||||
\ccIndexSubitemEnd{convex hull, 2D}{gift-wrapping}
|
||||
\ccIndexSubitemEnd{extreme points, 2D}{between two points}
|
||||
|
||||
\ccImplementation
|
||||
|
||||
The function uses the Jarvis march (gift-wrapping)
|
||||
algorithm \cite{j-ichfs-73}. This algorithm requires $O(n h)$ time
|
||||
in the worst case for $n$ input points with $h$ extreme points.
|
||||
\end{ccRefFunction}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ch_melkman.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefFunction}{ch_melkman} %% add template arg's if necessary
|
||||
\ccIndexSubitemBegin{convex hull, 2D}{of polyline or polygon}
|
||||
\ccIndexSubitemBegin{convex hull, 2D}{Melkman algorithm}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ computes the counterclockwise sequence of
|
||||
extreme points of a sequence of points that forms a simple polyline or polygon.
|
||||
|
||||
\ccInclude{CGAL/ch_melkman.C}
|
||||
|
||||
\ccFunction{template <class InputIterator, class OutputIterator>
|
||||
OutputIterator
|
||||
ch_melkman( InputIterator first, InputIterator last,
|
||||
OutputIterator result,
|
||||
const Traits& ch_traits = Default_traits);}
|
||||
{generates the counterclockwise sequence of extreme points
|
||||
of the points in the range [\ccc{first}, \ccc{beyond}).
|
||||
The resulting sequence is placed starting at
|
||||
position \ccc{result}, and the past-the-end iterator for
|
||||
the resulting sequence is returned.
|
||||
\ccPrecond %\ccIndexSubitem[C]{ch_melkman}{preconditions}
|
||||
The source range [\ccc{first},\ccc{beyond}) corresponds
|
||||
to a simple polyline.
|
||||
[\ccc{first},\ccc{beyond}) does not contain \ccc{result}}.
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{InputIterator::value_type} is defined.
|
||||
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\begin{enumerate}
|
||||
\item \ccc{InputIterator::value_type} and \ccc{OutputIterator::value_type}
|
||||
are equivalent to \ccc{Traits::Point_2}.
|
||||
\item \ccc{Traits} contains the following subset of types from
|
||||
the concept ConvexHullTraits\_2 and their corresponding member
|
||||
%\ccIndexMainItem[c]{ConvexHullTraits_2}
|
||||
functions that return instances of these types:
|
||||
\begin{itemize}
|
||||
\item \ccc{Traits::Point_2},
|
||||
\item \ccc{Traits::Less_xy_2},
|
||||
\item \ccc{Traits::Leftturn_2}.
|
||||
\end{itemize}
|
||||
\end{enumerate}
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_akl_toussaint} \\
|
||||
\ccRefIdfierPage{CGAL::ch_bykat} \\
|
||||
\ccRefIdfierPage{CGAL::ch_eddy} \\
|
||||
\ccRefIdfierPage{CGAL::ch_graham_andrew} \\
|
||||
\ccRefIdfierPage{CGAL::ch_jarvis} \\
|
||||
\ccRefIdfierPage{CGAL::ch_melkman} \\
|
||||
\ccRefIdfierPage{CGAL::convex_hull_2}
|
||||
|
||||
\ccImplementation
|
||||
|
||||
It uses an implementation of Melkman's algorithm \cite{m-olcch-87}. Running
|
||||
time of this is linear.
|
||||
|
||||
\ccIndexSubitemEnd{convex hull, 2D}{of polyline or polygon}
|
||||
\ccIndexSubitemEnd{convex hull, 2D}{Melkman algorithm}
|
||||
\end{ccRefFunction}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ch_n_point.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefFunction}{ch_n_point} %% add template arg's if necessary
|
||||
\ccIndexSubitemBegin{extreme points, 2D}{in coordinate directions}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ finds a point in a given set
|
||||
of input points with maximal $y$ coordinate.
|
||||
|
||||
\ccInclude{CGAL/ch_selected_extreme_points_2.h}
|
||||
|
||||
\ccFunction{template <class ForwardIterator>
|
||||
void
|
||||
ch_n_point( ForwardIterator first, ForwardIterator beyond,
|
||||
ForwardIterator& n,
|
||||
const Traits & ch_traits = Default_traits);}
|
||||
{traverses the range [\ccc{first},\ccc{beyond}).
|
||||
After execution, the value of
|
||||
\ccc{n} is an iterator in the range such that \ccc{*n} $\ge_{yx}$
|
||||
\ccc{*it} for all iterators \ccc{it} in the range.}
|
||||
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the type
|
||||
\ccc{ForwardIteartor::value_type} is defined.
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\ccc{Traits} defines the type \ccc{Traits::Less_yx_2} as specified in
|
||||
the concept ConvexHullTraits\_2 and the corresponding member
|
||||
function that returns an instance of this type.
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_e_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_nswe_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_ns_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_s_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_w_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_we_point}
|
||||
|
||||
\ccIndexSubitemEnd{extreme points, 2D}{in coordinate directions}
|
||||
\end{ccRefFunction}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ch_ns_point.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefFunction}{ch_ns_point} %% add template arg's if necessary
|
||||
\ccIndexSubitemBegin{extreme points, 2D}{in coordinate directions}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ finds the points of a given set
|
||||
of input points with minimal and maximal $x$ coordinates.
|
||||
|
||||
\ccInclude{CGAL/ch_selected_extreme_points_2.h}
|
||||
|
||||
\ccFunction{template <class ForwardIterator>
|
||||
void
|
||||
ch_ns_point( ForwardIterator first, ForwardIterator beyond,
|
||||
ForwardIterator& n,
|
||||
ForwardIterator& s,
|
||||
const Traits & ch_traits = Default_traits);}
|
||||
{traverses the range [\ccc{first},\ccc{beyond}).
|
||||
After execution, the value of
|
||||
\ccc{n} is an iterator in the range such that \ccc{*n} $\ge_{yx}$
|
||||
\ccc{*it} for all iterators \ccc{it} in the range. Similarly, for
|
||||
\ccc{s} the inequality \ccc{*s} $\le_{yx}$ \ccc{*it}
|
||||
holds for all iterators in the range.}
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{ForwardIteartor::value_type} is defined.
|
||||
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\ccc{Traits} defines the type \ccc{Traits::Less_yx_2} as specified in
|
||||
the concept ConvexHullTraits\_2 and the corresponding member
|
||||
function that returns an instance of this type.
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_e_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_nswe_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_n_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_s_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_w_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_we_point}
|
||||
|
||||
\ccIndexSubitemEnd{extreme points, 2D}{in coordinate directions}
|
||||
\end{ccRefFunction}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ch_nswe_point.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefFunction}{ch_nswe_point} %% add template arg's if necessary
|
||||
\ccIndexSubitemBegin{extreme points, 2D}{in coordinate directions}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ 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 $y$, minimal $y$,
|
||||
minimal $x$, and maximal $x$ coordinates.
|
||||
|
||||
\ccInclude{CGAL/ch_selected_extreme_points_2.h}
|
||||
|
||||
\ccFunction{template <class ForwardIterator>
|
||||
void
|
||||
ch_nswe_point( ForwardIterator first, ForwardIterator beyond,
|
||||
ForwardIterator& n,
|
||||
ForwardIterator& s,
|
||||
ForwardIterator& w,
|
||||
ForwardIterator& e,
|
||||
const Traits & ch_traits = Default_traits);}
|
||||
{traverses the range [\ccc{first},\ccc{beyond}).
|
||||
After execution, the value of
|
||||
\ccc{n} is an iterator in the range such that \ccc{*n} $\ge_{yx}$
|
||||
\ccc{*it} for all iterators \ccc{it} in the range. Similarly, for
|
||||
\ccc{s}, \ccc{w}, and \ccc{e} the inequalities \ccc{*s} $\le_{yx}$
|
||||
\ccc{*it}, \ccc{*w} $\le_{xy}$ \ccc{*it}, and \ccc{*e}
|
||||
$\ge_{xy}$ \ccc{*it} hold for all iterators
|
||||
\ccc{it} in the range.}
|
||||
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\ccc{Traits} contains the following subset of types from
|
||||
the concept ConvexHullTraits\_2 and their corresponding member
|
||||
functions that return instances of these types:
|
||||
\begin{itemize}
|
||||
\item \ccc{Traits::Less_xy_2},
|
||||
\item \ccc{Traits::Less_yx_2}.
|
||||
\end{itemize}
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{ForwardIteartor::value_type} is defined.
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_e_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_n_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_ns_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_s_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_w_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_we_point}
|
||||
|
||||
\ccIndexSubitemEnd{extreme points, 2D}{in coordinate directions}
|
||||
\end{ccRefFunction}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ch_s_point.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefFunction}{ch_s_point} %% add template arg's if necessary
|
||||
\ccIndexSubitemBegin{extreme points, 2D}{in coordinate directions}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ finds a points in a given set
|
||||
of input points with minimal $y$ coordinates.
|
||||
|
||||
\ccInclude{CGAL/ch_selected_extreme_points_2.h}
|
||||
|
||||
\ccFunction{template <class ForwardIterator>
|
||||
void
|
||||
ch_s_point( ForwardIterator first, ForwardIterator beyond,
|
||||
ForwardIterator& s,
|
||||
const Traits & ch_traits = Default_traits);}
|
||||
{traverses the range [\ccc{first},\ccc{beyond}).
|
||||
After execution, the value of
|
||||
\ccc{s} is an iterator in the range such that \ccc{*s} $\le_{yx}$
|
||||
\ccc{*it} for all iterators \ccc{it} in the range.}
|
||||
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{ForwardIteartor::value_type} is defined.
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\ccc{Traits} defines the type \ccc{Traits::Less_yx_2} as specified in
|
||||
the concept ConvexHullTraits\_2 and the corresponding member
|
||||
function that returns an instance of this type.
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_e_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_nswe_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_n_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_ns_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_w_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_we_point}
|
||||
|
||||
\ccIndexSubitemEnd{extreme points, 2D}{in coordinate directions}
|
||||
\end{ccRefFunction}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ch_w_point.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefFunction}{ch_w_point} %% add template arg's if necessary
|
||||
\ccIndexSubitemBegin{extreme points, 2D}{in coordinate directions}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ finds a point in a given set
|
||||
of input points with minimal $x$ coordinate.
|
||||
|
||||
\ccInclude{CGAL/ch_selected_extreme_points_2.h}
|
||||
|
||||
\ccFunction{template <class ForwardIterator>
|
||||
void
|
||||
ch_w_point( ForwardIterator first, ForwardIterator beyond,
|
||||
ForwardIterator& w,
|
||||
const Traits & ch_traits = Default_traits);}
|
||||
{traverses the range [\ccc{first},\ccc{beyond}).
|
||||
After execution, the value of
|
||||
\ccc{w} is an iterator in the range such that \ccc{*w} $\le_{xy}$
|
||||
\ccc{*it} for all iterators \ccc{it} in the range.}
|
||||
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\ccc{Traits} defines the type \ccc{Traits::Less_xy_2} as specified in
|
||||
the concept ConvexHullTraits\_2 and the corresponding member
|
||||
function that returns an instance of this type.
|
||||
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{ForwardIteartor::value_type} is defined.
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_e_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_nswe_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_n_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_ns_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_s_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_we_point}
|
||||
|
||||
\ccIndexSubitemEnd{extreme points, 2D}{in coordinate directions}
|
||||
\end{ccRefFunction}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ch_we_point.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefFunction}{ch_we_point} %% add template arg's if necessary
|
||||
\ccIndexSubitemBegin{extreme points, 2D}{in coordinate directions}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ finds two points of a given set
|
||||
of input points with minimal and maximal $x$ coordinates.
|
||||
|
||||
\ccInclude{CGAL/ch_selected_extreme_points_2.h}
|
||||
|
||||
\ccFunction{template <class ForwardIterator>
|
||||
void
|
||||
ch_we_point( ForwardIterator first, ForwardIterator beyond,
|
||||
ForwardIterator& w,
|
||||
ForwardIterator& e,
|
||||
const Traits & ch_traits = Default_traits);}
|
||||
{traverses the range [\ccc{first},\ccc{beyond}).
|
||||
After execution, the value of
|
||||
\ccc{w} is an iterator in the range such that \ccc{*w} $\le_{xy}$
|
||||
\ccc{*it} for all iterators \ccc{it} in the range. Similarly, for
|
||||
\ccc{e} the inequality \ccc{*e} $\ge_{xy}$ \ccc{*it}
|
||||
holds for all iterators in the range.}
|
||||
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{ForwardIteartor::value_type} is defined.
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\ccc{Traits} defines the type \ccc{Traits::Less_xy_2} as specified in
|
||||
the concept ConvexHullTraits\_2 and the corresponding member
|
||||
function that returns an instance of this type.
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_e_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_nswe_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_n_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_ns_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_s_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_w_point} \\
|
||||
|
||||
\ccIndexSubitemEnd{extreme points, 2D}{in coordinate directions}
|
||||
\end{ccRefFunction}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: convex_hull_2.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefFunction}{convex_hull_2} %% add template arg's if necessary
|
||||
\ccIndexMainItemBegin{convex hull, 2D}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ generates the counterclockwise sequence of extreme
|
||||
points from a given set of input points.
|
||||
|
||||
\ccInclude{CGAL/convex_hull_2.h}
|
||||
|
||||
\ccFunction{template <class InputIterator, class OutputIterator>
|
||||
OutputIterator
|
||||
convex_hull_2(InputIterator first, InputIterator beyond,
|
||||
OutputIterator result,
|
||||
const Traits & ch_traits = Default_traits );}
|
||||
{generates the counterclockwise sequence of extreme points
|
||||
of the points in the range [\ccc{first},\ccc{beyond}).
|
||||
The resulting sequence is placed starting at position
|
||||
\ccc{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.
|
||||
\ccPrecond %\ccIndexSubitem[C]{convex_hull_2}{preconditions}
|
||||
The source range [\ccc{first},\ccc{beyond}) does not contain
|
||||
\ccc{result}.}
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which
|
||||
the type \ccc{InputIterator::value_type} is defined.
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\begin{enumerate}
|
||||
\item \ccc{InputIterator::value_type} and \ccc{OutputIterator::value_type}
|
||||
are equivalent to \ccc{Traits::Point_2}.
|
||||
\item \ccc{Traits} contains the following subset of types from
|
||||
the concept ConvexHullTraits\_2 and their corresponding member
|
||||
%\ccIndexMainItem[c]{ConvexHullTraits_2}
|
||||
functions that return instances of these types:
|
||||
\begin{itemize}
|
||||
\item \ccc{Traits::Point_2},
|
||||
\item \ccc{Traits::Less_xy_2},
|
||||
\item \ccc{Traits::Less_yx_2},
|
||||
\item \ccc{Traits::Left_of_line_2},
|
||||
\item \ccc{Traits::Leftturn_2}.
|
||||
\end{itemize}
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_akl_toussaint} \\
|
||||
\ccRefIdfierPage{CGAL::ch_bykat} \\
|
||||
\ccRefIdfierPage{CGAL::ch_eddy} \\
|
||||
\ccRefIdfierPage{CGAL::ch_graham_andrew} \\
|
||||
\ccRefIdfierPage{CGAL::ch_jarvis} \\
|
||||
\ccRefIdfierPage{CGAL::ch_melkman}
|
||||
|
||||
\ccImplementation
|
||||
|
||||
One of two algorithms is used,
|
||||
depending on the type of iterator used to specify the input points. For
|
||||
input iterators, the algorithm used is that of Bykat \cite{b-chfsp-78}, which
|
||||
has a worst-case running time of $O(n h)$, where $n$ is the number of input
|
||||
points and $h$ is the number of extreme points. For all other types of
|
||||
iterators, the $O(n \log n)$ algorithm of of Akl and Toussaint
|
||||
\cite{at-fcha-78} is used.
|
||||
|
||||
|
||||
\ccExample
|
||||
In the following example we use the \stl-compliant interface of
|
||||
\ccc{CGAL::Polygon_2} to construct the convex hull polygon from the
|
||||
sequence of extreme points. Point data are read from standard input, the
|
||||
convex hull polygon is shown in a \cgal\ window.
|
||||
Remember, that when no traits class is specified for the function
|
||||
\ccc{convex_hull_2}, the kernel from which the input points come is
|
||||
used as the default traits class.
|
||||
|
||||
\ccIncludeExampleCode{Convex_hull_2/convex_hull_2_demo.C}
|
||||
|
||||
\ccIndexMainItemEnd{convex hull, 2D}
|
||||
\end{ccRefFunction}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,183 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ConvexHull/intro.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 10.5.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: ConvexHull
|
||||
% |
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\clearpage
|
||||
\section{Reference Pages for Convex Hulls and Extreme Points}
|
||||
|
||||
A subset $S \subseteq \R^d$ is convex if for any two points $p$ and $q$
|
||||
in the set the line segment with endpoints $p$ and $q$ is contained
|
||||
in $S$. The convex hull\ccIndexMainItemDef{convex hull} of a set $S$ is
|
||||
the smallest convex set containing
|
||||
$S$. The convex hull of a set of points $P$ is a convex
|
||||
polytope with vertices in $P$. A point in $P$ is an extreme point
|
||||
(with respect to $P$)\ccIndexMainItemDef{extreme point} if it is a vertex
|
||||
of the convex hull of $P$.
|
||||
|
||||
\cgal\ provides functions for computing convex hulls in two, three and
|
||||
arbirary dimensions as well as functions for testing if a given set of points
|
||||
in is strongly convex or not. For two dimensions,
|
||||
there are also a number of functions available for computing particular
|
||||
extreme points and subsequences of the hull points, such as the lower
|
||||
hull or upper hull of a set of points.
|
||||
|
||||
|
||||
\ccHeading{Assertions}
|
||||
\ccIndexSubitem{convex hull, 2D}{assertion flags}
|
||||
\ccIndexSubitem{assertion flags}{convex hull, 2D}
|
||||
\ccIndexSubitem{convex hull, 3D}{assertion flags}
|
||||
\ccIndexSubitem{assertion flags}{convex hull, 3D}
|
||||
The assertion flags for the convex hull and extreme point algorithms
|
||||
use \ccc{CH} in their names (\textit{e.g.}, \ccc{CGAL_CH_NO_POSTCONDITIONS}).
|
||||
For the convex hull algorithms, the postcondition
|
||||
check tests only convexity (if not disabled), but not containment of the
|
||||
input points in the polygon or polyhedron defined by the output points.
|
||||
The latter is considered an expensive checking and can be enabled by
|
||||
defining \ccc{CGAL_CH_CHECK_EXPENSIVE}%
|
||||
\ccIndexAssertionFlagName{CGAL_CH_CHECK_EXPENSIVE}.
|
||||
|
||||
|
||||
\ccHeading{Concepts}
|
||||
|
||||
\lcTex{
|
||||
%\ccRefConceptPage{ConvexHull3fromD_Rep}\\
|
||||
\ccRefConceptPage{ConvexHullPolyhedron_3}\\
|
||||
\ccRefConceptPage{ConvexHullPolyhedronFacet_3}\\
|
||||
\ccRefConceptPage{ConvexHullPolyhedronHalfedge_3}\\
|
||||
\ccRefConceptPage{ConvexHullPolyhedronVertex_3}\\
|
||||
\ccRefConceptPage{ConvexHullTraits_2}\\
|
||||
\ccRefConceptPage{ConvexHullTraits_3} \\
|
||||
\ccRefConceptPage{IsStronglyConvexTraits_3}
|
||||
}
|
||||
|
||||
\lcHtml{
|
||||
%\input{ConvexHull_ref/ConvexHull3fromD_Rep}
|
||||
\input{ConvexHull_ref/ConvexHullPolyhedron_3}
|
||||
\input{ConvexHull_ref/ConvexHullPolyhedronFacet_3}
|
||||
\input{ConvexHull_ref/ConvexHullPolyhedronHalfedge_3}
|
||||
\input{ConvexHull_ref/ConvexHullPolyhedronVertex_3}
|
||||
\input{ConvexHull_ref/ConvexHullTraits_2}
|
||||
\input{ConvexHull_ref/ConvexHullTraits_3}
|
||||
\input{ConvexHull_ref/IsStronglyConvexTraits_3}
|
||||
}
|
||||
|
||||
\ccHeading{Traits Classes}
|
||||
|
||||
\lcTex{
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_constructive_traits_2<R>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_d_traits_3<R>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_leda_traits_2} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_xy_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_xz_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_projective_yz_traits_2<Point_3>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_rat_leda_traits_2} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_traits_2<R>} \\
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_traits_3<R>} \\
|
||||
}
|
||||
|
||||
\lcHtml{
|
||||
\input{ConvexHull_ref/Convex_hull_constructive_traits_2}
|
||||
\input{ConvexHull_ref/Convex_hull_d_traits_3}
|
||||
\input{ConvexHull_ref/Convex_hull_leda_traits_2}
|
||||
\input{ConvexHull_ref/Convex_hull_projective_xy_traits_2}
|
||||
\input{ConvexHull_ref/Convex_hull_projective_xz_traits_2}
|
||||
\input{ConvexHull_ref/Convex_hull_projective_yz_traits_2}
|
||||
\input{ConvexHull_ref/Convex_hull_rat_leda_traits_2}
|
||||
\input{ConvexHull_ref/Convex_hull_traits_2}
|
||||
\input{ConvexHull_ref/Convex_hull_traits_3}
|
||||
}
|
||||
|
||||
\ccHeading{Convex Hull Functions}
|
||||
|
||||
\lcTex{
|
||||
\ccRefIdfierPage{CGAL::ch_akl_toussaint} \\
|
||||
\ccRefIdfierPage{CGAL::ch_bykat} \\
|
||||
\ccRefIdfierPage{CGAL::ch_eddy} \\
|
||||
\ccRefIdfierPage{CGAL::ch_graham_andrew} \\
|
||||
\ccRefIdfierPage{CGAL::ch_jarvis} \\
|
||||
\ccRefIdfierPage{CGAL::ch_melkman} \\
|
||||
\ccRefIdfierPage{CGAL::convex_hull_2} \\
|
||||
\ccRefIdfierPage{CGAL::convex_hull_3} \\
|
||||
\ccRefIdfierPage{CGAL::convex_hull_incremental_3}
|
||||
}
|
||||
|
||||
\lcHtml{
|
||||
\input{ConvexHull_ref/ch_akl_toussaint}
|
||||
\input{ConvexHull_ref/ch_bykat}
|
||||
\input{ConvexHull_ref/ch_eddy}
|
||||
\input{ConvexHull_ref/ch_graham_andrew}
|
||||
\input{ConvexHull_ref/ch_jarvis}
|
||||
\input{ConvexHull_ref/ch_melkman}
|
||||
\input{ConvexHull_ref/convex_hull_2}
|
||||
\input{ConvexHull_ref/convex_hull_3}
|
||||
\input{ConvexHull_ref/convex_hull_incremental_3}
|
||||
}
|
||||
|
||||
\ccHeading{Convex Hull Class}
|
||||
|
||||
\lcTex{
|
||||
\ccRefIdfierPage{CGAL::Convex_hull_d<R>}
|
||||
}
|
||||
|
||||
\lcHtml{
|
||||
\input{ConvexHull_ref/Convex_hull_d}
|
||||
}
|
||||
|
||||
\ccHeading{Convexity Checking Functions}
|
||||
|
||||
\lcTex{
|
||||
\ccRefIdfierPage{CGAL::is_ccw_strongly_convex_2} \\
|
||||
\ccRefIdfierPage{CGAL::is_cw_strongly_convex_2} \\
|
||||
\ccRefIdfierPage{CGAL::is_strongly_convex_3}
|
||||
}
|
||||
|
||||
\lcHtml{
|
||||
\input{ConvexHull_ref/is_ccw_strongly_convex_2}
|
||||
\input{ConvexHull_ref/is_cw_strongly_convex_2}
|
||||
\input{ConvexHull_ref/is_strongly_convex_3}
|
||||
}
|
||||
|
||||
\ccHeading{Hull Subsequence Functions}
|
||||
|
||||
\lcTex{
|
||||
\ccRefIdfierPage{CGAL::ch_graham_andrew_scan} \\
|
||||
\ccRefIdfierPage{CGAL::ch_jarvis_march} \\
|
||||
\ccRefIdfierPage{CGAL::lower_hull_points_2} \\
|
||||
\ccRefIdfierPage{CGAL::upper_hull_points_2}
|
||||
}
|
||||
|
||||
\lcHtml{
|
||||
\input{ConvexHull_ref/ch_graham_andrew_scan}
|
||||
\input{ConvexHull_ref/ch_jarvis_march}
|
||||
\input{ConvexHull_ref/lower_hull_points_2}
|
||||
\input{ConvexHull_ref/upper_hull_points_2}
|
||||
}
|
||||
|
||||
\ccHeading{Extreme Point Functions}
|
||||
|
||||
\lcTex{
|
||||
\ccRefIdfierPage{CGAL::ch_e_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_nswe_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_n_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_ns_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_s_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_w_point} \\
|
||||
\ccRefIdfierPage{CGAL::ch_we_point}
|
||||
}
|
||||
|
||||
\lcHtml{
|
||||
\input{ConvexHull_ref/ch_e_point}
|
||||
\input{ConvexHull_ref/ch_nswe_point}
|
||||
\input{ConvexHull_ref/ch_n_point}
|
||||
\input{ConvexHull_ref/ch_ns_point}
|
||||
\input{ConvexHull_ref/ch_s_point}
|
||||
\input{ConvexHull_ref/ch_w_point}
|
||||
\input{ConvexHull_ref/ch_we_point}
|
||||
}
|
||||
|
||||
\clearpage
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: is_ccw_strongly_convex_2.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefFunction}{is_ccw_strongly_convex_2}
|
||||
\ccIndexMainItemBegin{convexity checking, 2D}
|
||||
\ccIndexSubitemBegin{polygon}{strongly convex}
|
||||
\ccIndexSubitemBegin{strongly convex}{polygon}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ determines if a given sequence of points defines
|
||||
a counterclockwise-oriented, stongly convex polygon.
|
||||
A set of points is said to be strongly convex
|
||||
if it consists of only extreme points
|
||||
(\textit{i.e.}, vertices of the convex hull).
|
||||
|
||||
\ccInclude{CGAL/convexity_check_2.h}
|
||||
|
||||
\ccFunction{template <class ForwardIterator, class Traits>
|
||||
bool
|
||||
is_ccw_strongly_convex_2(
|
||||
ForwardIterator first,
|
||||
ForwardIterator beyond,
|
||||
const Traits & ch_traits = Default_traits);}
|
||||
{returns \ccc{true}, iff the point elements in
|
||||
[\ccc{first},\ccc{beyond})
|
||||
form a counterclockwise-oriented strongly convex polygon.
|
||||
}
|
||||
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{ForwardIterator::value_type} is defined.
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\ccc{Traits} contains the following subset of types from
|
||||
the concept ConvexHullTraits\_2 and their corresponding member
|
||||
%\ccIndexMainItem[c]{ConvexHullTraits_2}
|
||||
functions that return instances of these types:
|
||||
\begin{itemize}
|
||||
\item \ccc{Traits::Less_xy_2},
|
||||
\item \ccc{Traits::Leftturn_2}.
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::is_cw_strongly_convex_2} \\
|
||||
\ccRefIdfierPage{CGAL::is_strongly_convex_3}
|
||||
|
||||
\ccIndexMainItemEnd{convexity checking, 2D}
|
||||
\ccIndexSubitemEnd{polygon}{strongly convex}
|
||||
\ccIndexSubitemEnd{strongly convex}{polygon}
|
||||
|
||||
\ccImplementation
|
||||
|
||||
The algorithm requires $O(n)$ time for a set of $n$ input points.
|
||||
|
||||
|
||||
\end{ccRefFunction}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: is_cw_strongly_convex_2.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefFunction}{is_cw_strongly_convex_2}
|
||||
\ccIndexMainItemBegin{convexity checking, 2D}
|
||||
\ccIndexSubitemBegin{polygon}{strongly convex}
|
||||
\ccIndexSubitemBegin{strongly convex}{polygon}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ determines if a given sequence of points defines
|
||||
a clockwise-oriented, stongly convex polygon.
|
||||
A set of points is said to be strongly convex %
|
||||
\ccIndexMainItemDef{strongly convex} if it consists of only extreme points
|
||||
(\textit{i.e.}, vertices of the convex hull).
|
||||
|
||||
|
||||
\ccInclude{CGAL/convexity_check_2.h}
|
||||
|
||||
\ccFunction{template <class ForwardIterator, class Traits>
|
||||
bool
|
||||
is_cw_strongly_convex_2(
|
||||
ForwardIterator first,
|
||||
ForwardIterator beyond,
|
||||
const Traits & ch_traits = Default_traits);}
|
||||
{returns \ccc{true}, iff the point elements in
|
||||
[\ccc{first},\ccc{beyond})
|
||||
form a clockwise-oriented strongly convex polygon.
|
||||
}
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{ForwardIterator::value_type} is defined.
|
||||
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\ccc{Traits} contains the following subset of types from
|
||||
the concept ConvexHullTraits\_2 and their corresponding member
|
||||
%\ccIndexMainItem[c]{ConvexHullTraits_2}
|
||||
functions that return instances of these types:
|
||||
\begin{itemize}
|
||||
\item \ccc{Traits::Less_xy_2},
|
||||
\item \ccc{Traits::Leftturn_2}.
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::is_ccw_strongly_convex_2} \\
|
||||
\ccRefIdfierPage{CGAL::is_strongly_convex_3}
|
||||
|
||||
\ccImplementation
|
||||
The algorithm requires $O(n)$ time for a set of $n$ input points.
|
||||
|
||||
\ccIndexMainItemEnd{convexity checking, 2D}
|
||||
\ccIndexSubitemEnd{polygon}{strongly convex}
|
||||
\ccIndexSubitemEnd{strongly convex}{polygon}
|
||||
\end{ccRefFunction}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: lower_hull_points_2.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefFunction}{lower_hull_points_2} %% add template arg's if necessary
|
||||
\ccIndexMainItemBegin{lower hull, 2D}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ generates the counterclockwise sequence of extreme
|
||||
points on the lower hull of a given set of input points.
|
||||
|
||||
|
||||
\ccInclude{CGAL/convex_hull_2.h}
|
||||
|
||||
\ccFunction{template <class InputIterator, class OutputIterator>
|
||||
OutputIterator
|
||||
lower_hull_points_2(InputIterator first, InputIterator beyond,
|
||||
OutputIterator result,
|
||||
const Traits & ch_traits = Default_traits );}
|
||||
{generates the counterclockwise sequence of extreme points
|
||||
on the lower hull of the points in the range [\ccc{first},
|
||||
\ccc{beyond}). The resulting sequence is placed starting at
|
||||
position \ccc{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 ({\it i.e.}, leftmost and
|
||||
rightmost point are equal) the extreme point is reported.
|
||||
\ccPrecond% \ccIndexSubitem[C]{lower_hull_points_2}{preconditions}
|
||||
The source range [\ccc{first},\ccc{beyond}) does not contain
|
||||
\ccc{result}.}
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{InputIterator::value_type} is defined.
|
||||
|
||||
The different treatment by \ccc{CGAL::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.
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\begin{enumerate}
|
||||
\item \ccc{InputIterator::value_type} and \ccc{OutputIterator::value_type}
|
||||
are equivalent to \ccc{Traits::Point_2}.
|
||||
\item \ccc{Traits} contains the following subset of types from
|
||||
the concept ConvexHullTraits\_2 and their corresponding member
|
||||
functions that return instances of these types:
|
||||
\begin{itemize}
|
||||
\item \ccc{Traits::Point_2},
|
||||
\item \ccc{Traits::Less_xy_2},
|
||||
\item \ccc{Traits::Less_yx_2},
|
||||
\item \ccc{Traits::Left_of_line_2},
|
||||
\item \ccc{Traits::Leftturn_2}.
|
||||
\end{itemize}
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_graham_andrew} \\
|
||||
\ccRefIdfierPage{CGAL::ch_graham_andrew_scan} \\
|
||||
\ccRefIdfierPage{CGAL::upper_hull_points_2}
|
||||
|
||||
\ccImplementation
|
||||
|
||||
This function uses Andrew's variant of Graham's scan algorithm
|
||||
\cite{a-aeach-79,m-mdscg-84}. The algorithm has worst-case running time
|
||||
of $O(n \log n)$ for $n$ input points.
|
||||
|
||||
\ccIndexMainItemEnd{lower hull, 2D}
|
||||
\end{ccRefFunction}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | CBP Reference Manual: main.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | Automatically generated driver file for the reference manual chapter
|
||||
% | of this package. Do not edit manually, you may loose your changes.
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\input{ConvexHull_ref/intro.tex}
|
||||
|
||||
\lcTex{
|
||||
\input{ConvexHull_ref/ch_akl_toussaint.tex}
|
||||
\input{ConvexHull_ref/ch_bykat.tex}
|
||||
\input{ConvexHull_ref/ch_eddy.tex}
|
||||
\input{ConvexHull_ref/ch_e_point.tex}
|
||||
\input{ConvexHull_ref/ch_graham_andrew.tex}
|
||||
\input{ConvexHull_ref/ch_graham_andrew_scan.tex}
|
||||
\input{ConvexHull_ref/ch_jarvis.tex}
|
||||
\input{ConvexHull_ref/ch_jarvis_march.tex}
|
||||
\input{ConvexHull_ref/ch_melkman.tex}
|
||||
\input{ConvexHull_ref/ch_nswe_point.tex}
|
||||
\input{ConvexHull_ref/ch_ns_point.tex}
|
||||
\input{ConvexHull_ref/ch_n_point.tex}
|
||||
\input{ConvexHull_ref/ch_s_point.tex}
|
||||
\input{ConvexHull_ref/ch_we_point.tex}
|
||||
\input{ConvexHull_ref/ch_w_point.tex}
|
||||
\input{ConvexHull_ref/convex_hull_2.tex}
|
||||
\input{ConvexHull_ref/convex_hull_3.tex}
|
||||
\input{ConvexHull_ref/convex_hull_incremental_3.tex}
|
||||
\input{ConvexHull_ref/ConvexHullPolyhedronFacet_3.tex}
|
||||
\input{ConvexHull_ref/ConvexHullPolyhedronHalfedge_3.tex}
|
||||
\input{ConvexHull_ref/ConvexHullPolyhedronVertex_3.tex}
|
||||
\input{ConvexHull_ref/ConvexHullPolyhedron_3.tex}
|
||||
\input{ConvexHull_ref/ConvexHullTraits_2.tex}
|
||||
\input{ConvexHull_ref/ConvexHullTraits_3.tex}
|
||||
\input{ConvexHull_ref/Convex_hull_constructive_traits_2.tex}
|
||||
\input{ConvexHull_ref/Convex_hull_d.tex}
|
||||
\input{ConvexHull_ref/Convex_hull_d_traits_3.tex}
|
||||
\input{ConvexHull_ref/Convex_hull_leda_traits_2.tex}
|
||||
\input{ConvexHull_ref/Convex_hull_projective_xy_traits_2.tex}
|
||||
\input{ConvexHull_ref/Convex_hull_projective_xz_traits_2.tex}
|
||||
\input{ConvexHull_ref/Convex_hull_projective_yz_traits_2.tex}
|
||||
\input{ConvexHull_ref/Convex_hull_rat_leda_traits_2.tex}
|
||||
\input{ConvexHull_ref/Convex_hull_traits_2.tex}
|
||||
\input{ConvexHull_ref/Convex_hull_traits_3.tex}
|
||||
\input{ConvexHull_ref/is_ccw_strongly_convex_2.tex}
|
||||
\input{ConvexHull_ref/is_cw_strongly_convex_2.tex}
|
||||
\input{ConvexHull_ref/is_strongly_convex_3.tex}
|
||||
\input{ConvexHull_ref/IsStronglyConvexTraits_3.tex}
|
||||
\input{ConvexHull_ref/lower_hull_points_2.tex}
|
||||
\input{ConvexHull_ref/upper_hull_points_2.tex}
|
||||
}
|
||||
|
||||
%% EOF
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: upper_hull_points_2.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 09.05.2001 Susan Hert and Stefan Schirra
|
||||
% | Package: Convex_hull_2
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefFunction}{upper_hull_points_2} %% add template arg's if necessary
|
||||
\ccIndexMainItemBegin{upper hull, 2D}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The function \ccRefName\ generates the counterclockwise sequence of extreme
|
||||
points on the upper hull of a given set of input points.
|
||||
|
||||
\ccInclude{CGAL/convex_hull_2.h}
|
||||
|
||||
\ccFunction{template <class InputIterator, class OutputIterator>
|
||||
OutputIterator
|
||||
upper_hull_points_2(InputIterator first, InputIterator beyond,
|
||||
OutputIterator result,
|
||||
const Traits & ch_traits = Default_traits );}
|
||||
{generates the counterclockwise sequence of extreme points
|
||||
on the upper hull of the points in the range [\ccc{first},
|
||||
\ccc{beyond}). The resulting sequence is placed starting at
|
||||
position \ccc{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 ({\it i.e.}, the leftmost and
|
||||
rightmost point are equal), the extreme point is not reported.
|
||||
\ccPrecond% \ccIndexSubitem[C]{upper_hull_points_2}{preconditions}
|
||||
The source range [\ccc{first},\ccc{beyond}) does not contain
|
||||
\ccc{result}.}
|
||||
|
||||
|
||||
The default traits class \ccc{Default_traits} is the kernel in which the
|
||||
type \ccc{InputIterator::value_type} is defined.
|
||||
|
||||
The different treatment by \ccc{CGAL::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.
|
||||
|
||||
\ccHeading{Requirements}
|
||||
\begin{enumerate}
|
||||
\item \ccc{InputIterator::value_type} and \ccc{OutputIterator::value_type}
|
||||
are equilvalent to \ccc{Traits::Point_2}.
|
||||
\item \ccc{Traits} contains the following subset of types from
|
||||
the concept ConvexHullTraits\_2 and their corresponding member
|
||||
%\ccIndexMainItem[c]{ConvexHullTraits_2}
|
||||
functions that return instances of these types:
|
||||
\begin{itemize}
|
||||
\item \ccc{Traits::Point_2},
|
||||
\item \ccc{Traits::Less_xy_2},
|
||||
\item \ccc{Traits::Less_yx_2},
|
||||
\item \ccc{Traits::Left_of_line_2},
|
||||
\item \ccc{Traits::Leftturn_2}.
|
||||
\end{itemize}
|
||||
\end{enumerate}
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::ch_graham_andrew} \\
|
||||
\ccRefIdfierPage{CGAL::ch_graham_andrew_scan} \\
|
||||
\ccRefIdfierPage{CGAL::lower_hull_points_2}
|
||||
|
||||
\ccImplementation
|
||||
|
||||
This function uses Andrew's
|
||||
variant of Graham's scan algorithm \cite{a-aeach-79,m-mdscg-84}. The algorithm
|
||||
has worst-case running time of $O(n \log n)$ for $n$ input points.
|
||||
|
||||
\ccIndexMainItemEnd{upper hull, 2D}
|
||||
\end{ccRefFunction}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
\begin{ccHtmlOnly}
|
||||
<center>
|
||||
<img border=0 src=./saarhull.gif align=center>
|
||||
</center>
|
||||
\end{ccHtmlOnly}
|
||||
|
||||
\begin{ccTexOnly}
|
||||
\begin{center}
|
||||
\includegraphics[width=7cm]{saarhull.eps}
|
||||
%\leavevmode\epsfxsize8cm\epsffile{saarhull.eps}
|
||||
\end{center}
|
||||
\end{ccTexOnly}
|
||||
|
||||
\section{2D Convex Hull}
|
||||
\label{sec:convex_hull_2}
|
||||
\cgal\ provides implementations of several classical algorithms for
|
||||
computing the counterclockwise sequence of extreme points for a set of
|
||||
points in two dimensions (\textit{i.e.}, the counterclockwise sequence
|
||||
of points on the convex hull). The algorithms have different asymptotic
|
||||
running times and require slightly different sets of geometric primitives.
|
||||
Thus you may choose the algorithm that best fits your setting.
|
||||
|
||||
Each of the convex hull functions presents the same interface to the
|
||||
user. That is, the user provides a pair of iterators, \ccc{first}
|
||||
and \ccc{beyond}, an output iterator \ccc{result}, and a traits class
|
||||
\ccc{traits}. The points in the range [\ccc{first}, \ccc{beyond}) define
|
||||
the input points whose convex hull is to be computed. The counterclockwise
|
||||
sequence of extreme points is written to the sequence starting at position
|
||||
\ccc{result}, and the past-the-end iterator for the resulting set of
|
||||
points is returned. The traits classes for the functions specify the types
|
||||
of the input points and the geometric primitives that are required by
|
||||
the algorithms. All functions provide an interface in which this
|
||||
class need not be specified and defaults to types and operations defined
|
||||
in the kernel in which the input point type is defined.
|
||||
|
||||
Given a sequence of $n$ input points with $h$ extreme points,
|
||||
the function \ccc{convex_hull_2}\ccIndexMainItem[C]{convex_hull_2}
|
||||
uses either the output-sensitive $O(n h)$ algorithm of Bykat \cite{b-chfsp-78}
|
||||
(a non-recursive version of the quickhull \cite{bdh-qach-96} algorithm)%
|
||||
\ccIndexSubitem{convex hull, 2D}{quickhull}
|
||||
\ccIndexSubitem{convex hull, 2D}{Bykat's algorithm}
|
||||
or the algorithm of Akl and Toussaint, which requires $O(n \log n)$ time
|
||||
in the worst case. The algorithm chosen depends on the kind of
|
||||
iterator used to specify the input points. These two algorithms are
|
||||
also available via the functions \ccc{ch_bykat} and \ccc{ch_akl_toussaint},
|
||||
respectively. Also available are
|
||||
the $O(n \log n)$ Graham-Andrew scan algorithm \cite{a-aeach-79,m-mdscg-84}
|
||||
(\ccc{ch_graham_andrew}\ccIndexMainItem[C]{ch_graham_andrew}),
|
||||
the $O(n h)$ Jarvis march algorithm \cite{j-ichfs-73}
|
||||
(\ccc{ch_jarvis}\ccIndexMainItem[C]{ch_jarvis}),
|
||||
and Eddy's $O(n h)$ algorithm \cite{e-nchap-77}
|
||||
(\ccc{ch_eddy}\ccIndexMainItem[C]{ch_eddy}), which corresponds to the
|
||||
two-dimensional version of the quickhull algorithm.
|
||||
The linear-time algorithm of Melkman for producing the convex hull of
|
||||
simple polygonal chains (or polygons) is available through the function
|
||||
\ccc{ch_melkman}\ccIndexMainItem[C]{ch_melkman}.%
|
||||
\ccIndexSubitem{convex hull, 2D}{of polyline or polygon}
|
||||
|
||||
\section{Example using Bykat's algorithm}
|
||||
|
||||
In the following example a convex hull is constructed from point data read
|
||||
from standard input using Bykat's algorithm. The resulting convex polygon
|
||||
is stored in a \ccc{CGAL::Polygon_2} and then it is shown in a \cgal\ window.
|
||||
The default traits class is used here. The same results could be
|
||||
achieved by substituting the function \ccc{CGAL::ch_bykat} for
|
||||
\ccc{CGAL::convex_hull_2}, since the latter calls the former when the
|
||||
input points are specified using input interators.
|
||||
|
||||
\ccIncludeExampleCode{Convex_hull_2/convex_hull_2_demo.C}
|
||||
|
||||
|
||||
|
||||
\section{2D Extreme Points and Hull Subsequences}
|
||||
In addition to the functions for producing convex hulls, there are a
|
||||
number of functions for computing sets and sequences of points related
|
||||
to the convex hull.
|
||||
The functions \ccc{lower_hull_points_2}\ccIndexMainItem[C]{lower_hull_points_2}
|
||||
and \ccc{upper_hull_points_2}\ccIndexMainItem[C]{upper_hull_points_2}
|
||||
provide the computation of the counterclockwise
|
||||
sequence of extreme points on the lower hull and upper hull,
|
||||
respectively. The algorithm used in these functions is
|
||||
Andrew's variant of Graham's scan algorithm \cite{a-aeach-79,m-mdscg-84},
|
||||
which has worst-case running time of $O(n \log n)$.
|
||||
|
||||
There are also functions available for computing certain subsequences
|
||||
of the sequence of extreme points on the convex hull. The function
|
||||
\ccc{ch_jarvis_march}\ccIndexMainItem[C]{ch_jarvis_march}
|
||||
generates the counterclockwise ordered subsequence of
|
||||
extreme points between a given pair of points and
|
||||
\ccc{ch_graham_andrew_scan}\ccIndexMainItem[C]{ch_graham_andrew_scan}
|
||||
computes the sorted sequence of extreme points that are
|
||||
not left of the line defined by the first and last input points.
|
||||
|
||||
Finally, a set of functions
|
||||
(\ccc{ch_nswe_point}, \ccc{ch_ns_point}, \ccc{ch_we_point}, \ccc{ch_n_point},
|
||||
\ccc{ch_s_point}, \ccc{ch_w_point}, \ccc{ch_e_point})
|
||||
is provided for computing extreme points of a
|
||||
2D point set in the coordinate directions.%
|
||||
\ccIndexSubitem{extreme points, 2D}{in coordinate directions}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
\section{Introduction}
|
||||
|
||||
A subset $S \subseteq \R^d$ is convex if for any two points $p$ and $q$
|
||||
in the set the line segment with endpoints $p$ and $q$ is contained
|
||||
in $S$. The convex hull\ccIndexMainItemDef{convex hull} of a set $S$
|
||||
is the smallest convex set containing
|
||||
$S$. The convex hull of a set of points $P$ is a convex
|
||||
polytope with vertices in $P$. A point in $P$ is an extreme point
|
||||
(with respect to $P$)\ccIndexMainItemDef{extreme point} if it is a vertex of
|
||||
the convex hull of $P$. A set of points is said to be strongly convex %
|
||||
\ccIndexMainItemDef{strongly convex} if it consist of only extreme points.
|
||||
|
||||
This chapter describes the functions provided in
|
||||
\cgal\ for producing convex hulls in two and three dimensions as well as
|
||||
functions for checking if sets of points are strongly convex are not.
|
||||
For two dimensions, ther are also a number of functions described for
|
||||
computing particular extreme points and subsequences of hull points,
|
||||
such as the lower and upper hull of a set of points.
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
\section{Convexity Checking}
|
||||
|
||||
The functions \ccc{is_ccw_strongly_convex_2} and \ccc{is_cw_strongly_convex_2}
|
||||
check whether a given sequence of 2D points forms a (counter)clockwise strongly
|
||||
convex polygon.\ccIndexMainItem{convexity checking, 2D}%
|
||||
\ccIndexSubitem{polygon}{strongly convex}. These are used in postcondition
|
||||
testing of the two-dimensional convex hull functions%
|
||||
\ccIndexSubitem{convex hull, 2D}{postcondition}.
|
||||
|
||||
|
||||
\input{convexity_check_3}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
\chapter{Convex Hulls and Extreme Points}
|
||||
\label{chap:convex_hull}
|
||||
|
||||
\input{convex_hull_def}
|
||||
\input{convex_hull_2}
|
||||
\input{convex_hull_3}
|
||||
\input{convex_hull_d}
|
||||
\input{traits_classes}
|
||||
\input{convexity_checking}
|
||||
|
||||
\input{ConvexHull_ref/main.tex}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 67 KiB |
|
|
@ -1,31 +0,0 @@
|
|||
\section{Traits Classes}
|
||||
|
||||
Each of the functions used to compute convex hulls or extreme points
|
||||
is paramterized by a traits class, which specifies the types and geometric
|
||||
primitives to be used in the computation. For two dimensions, there are
|
||||
several implementations of traits classes provided in the library. The class
|
||||
\ccc{Convex_hull_traits_2<R>}\ccIndexMainItem[C]{Convex_hull_traits_2}
|
||||
corresponds to the default traits class that provides the types and
|
||||
predicates presented in the 2-dimensional \cgal\ kernel in which the input
|
||||
points lie. The class
|
||||
\ccc{Convex_hull_constructive_traits<R>}\ccIndexMainItem[C]{Convex_hull_constructive_traits}
|
||||
is a second traits class based on \cgal\ primitives but differs from
|
||||
\ccc{Convex_hull_traits_2} in that some of its primitives reuse
|
||||
intermediate results to speed up computation.
|
||||
There are also two traits classes defined for the two geometry kernels
|
||||
provided in \leda\ \cite{mn-l-99}
|
||||
(\ccc{Convex_hull_leda_traits_2}\ccIndexMainItem[C]{Convex_hull_leda_traits_2}
|
||||
and
|
||||
\ccc{Convex_hull_rat_leda_traits_2}\ccIndexMainItem[C]{Convex_hull_rat_leda_traits_2}), which provide an easy means of comparison with these kernels.
|
||||
In addition, there are three projective traits classes
|
||||
(\ccc{Convex_hull_projective_xy_traits_2},
|
||||
\ccc{Convex_hull_projective_xz_traits_2}, and
|
||||
\ccc{Convex_hull_projective_yz_traits_2}), %
|
||||
\ccIndexMainItem[C]{Convex_hull_projective_xy_traits_2}%
|
||||
\ccIndexMainItem[C]{Convex_hull_projective_xz_traits_2}%
|
||||
\ccIndexMainItem[C]{Convex_hull_projective_yz_traits_2}%
|
||||
which may be used to compute the convex hull of a set of three-dimensional
|
||||
points projected into each of the three coordinate planes.
|
||||
|
||||
\input{traits_classes_3.tex}
|
||||
\input{traits_classes_d.tex}
|
||||
Loading…
Reference in New Issue