changed: structure of Optimisation chapter, one section per algorithm

This commit is contained in:
Sven Schönherr 1998-03-25 14:33:43 +00:00
parent c2dde9d49d
commit 709a6adcc1
4 changed files with 128 additions and 72 deletions

View File

@ -38,8 +38,8 @@ $P$ may be empty or points may occur more than once. The algorithm
computes a support set $S$ which remains fixed until the next insert computes a support set $S$ which remains fixed until the next insert
or clear operation. or clear operation.
\emph{Note:} In this release correct results are only guaranteed if \emph{Note:} In this release correct results are only guaranteed if exact
exact arithmetic is used, see Section~\ref{sec:opt_traits_impl}. arithmetic is used, see Section~\ref{sec:min_circle_2_traits_impl_2D_kernel}.
\ccInclude{CGAL/Min_circle_2.h} \ccInclude{CGAL/Min_circle_2.h}
@ -52,11 +52,13 @@ primitives it uses. For example \ccc{Traits::Point} is a mapping on a
point class. Think of it as 2D points in the Euclidean plane. point class. Think of it as 2D points in the Euclidean plane.
We provide a traits class implementation using the \cgal\ 2D kernel as We provide a traits class implementation using the \cgal\ 2D kernel as
described in Section~\ref{sec:opt_traits_impl}. Traits class adapters described in Section~\ref{sec:min_circle_2_traits_impl_2D_kernel}.
to user supplied point classes are available, see Traits class adapters to user supplied point classes are available,
Section~\ref{sec:opt_traits_adapt}. Customizing own traits classes for see Sections~\ref{sec:min_circle_2_traits_adapterC2}
optimisation algorithms can be done according to the requirements for and~\ref{sec:min_circle_2_traits_adapterH2}. Customizing own traits
traits classes listed in Section~\ref{sec:opt_traits_req}. classes for optimisation algorithms can be done according to the
requirements for traits classes listed in
Section~\ref{sec:min_circle_2_traits_req}.
% ----------------------------------------------------------------------------- % -----------------------------------------------------------------------------
\ccTypes \ccTypes
@ -312,11 +314,11 @@ An object \ccVar\ is valid, iff
\item $S$ is minimal, i.e.\ no support point is redundant. \item $S$ is minimal, i.e.\ no support point is redundant.
\end{itemize} \end{itemize}
Using the traits class implementation for the \cgal\ kernel with exact Using the traits class implementation for the \cgal\ kernel with exact
arithmetic as described in Section~\ref{sec:opt_traits_impl} arithmetic as described in
guarantees validity of \ccVar. The following function is mainly Section~\ref{sec:min_circle_2_traits_impl_2D_kernel} guarantees
intended for debugging user supplied traits classes but also for validity of \ccVar. The following function is mainly intended for
convincing the anxious user that the traits class implementation is debugging user supplied traits classes but also for convincing the
correct. anxious user that the traits class implementation is correct.
\begin{ccAdvanced} \begin{ccAdvanced}
\ccMemberFunction{ bool is_valid( bool verbose = false, \ccMemberFunction{ bool is_valid( bool verbose = false,
int level = 0 ) const;}{ int level = 0 ) const;}{
@ -363,8 +365,8 @@ correct.
\ccc{CGAL_Min_ellipse_2} \ccc{CGAL_Min_ellipse_2}
\ccTexHtml{(Section~\ref{sec:min_ellipse_2_spec})}{}, \ccTexHtml{(Section~\ref{sec:min_ellipse_2_spec})}{},
\ccc{CGAL_Optimisation_traits_2} \ccc{CGAL_Min_circle_2_traits_2}
\ccTexHtml{(Section~\ref{sec:opt_traits_impl_2D_kernel})}{}, \ccTexHtml{(Section~\ref{sec:min_circle_2_traits_impl_2D_kernel})}{},
\linebreakByHand \linebreakByHand
\ccc{CGAL_Min_circle_2_adapterC2} \ccc{CGAL_Min_circle_2_adapterC2}
\ccTexHtml{(Section~\ref{sec:min_circle_2_traits_adapterC2})}{}, \ccTexHtml{(Section~\ref{sec:min_circle_2_traits_adapterC2})}{},
@ -393,13 +395,13 @@ randomization can be useful in certain cases, we give an example.
#include <CGAL/Gmpz.h> #include <CGAL/Gmpz.h>
#include <CGAL/Homogeneous.h> #include <CGAL/Homogeneous.h>
#include <CGAL/Point_2.h> #include <CGAL/Point_2.h>
#include <CGAL/Optimisation_traits_2.h> #include <CGAL/Min_circle_2_traits_2.h>
#include <CGAL/Min_circle_2.h> #include <CGAL/Min_circle_2.h>
typedef CGAL_Gmpz NT; typedef CGAL_Gmpz NT;
typedef CGAL_Homogeneous<NT> R; typedef CGAL_Homogeneous<NT> R;
typedef CGAL_Point_2<R> Point; typedef CGAL_Point_2<R> Point;
typedef CGAL_Optimisation_traits_2<R> Traits; typedef CGAL_Min_circle_2_traits_2<R> Traits;
typedef CGAL_Min_circle_2<Traits> Min_circle; typedef CGAL_Min_circle_2<Traits> Min_circle;
int main() int main()
@ -424,4 +426,16 @@ int main()
\end{ccClassTemplate} \end{ccClassTemplate}
% =============================================================================
\input{Min_circle_2_traits_2}
\input{Min_circle_2_adapterC2}
\input{Min_circle_2_adapterH2}
\input{requirements_adapterC2}
\input{requirements_adapterH2}
\input{requirements_Min_circle_2}
% ===== EOF =================================================================== % ===== EOF ===================================================================

View File

@ -38,8 +38,8 @@ $P$ may be empty or points may occur more than once. The algorithm
computes a support set $S$ which remains fixed until the next insert computes a support set $S$ which remains fixed until the next insert
or clear operation. or clear operation.
\emph{Note:} In this release correct results are only guaranteed if \emph{Note:} In this release correct results are only guaranteed if exact
exact arithmetic is used, see Section~\ref{sec:opt_traits_impl}. arithmetic is used, see Section~\ref{sec:min_circle_2_traits_impl_2D_kernel}.
\ccInclude{CGAL/Min_circle_2.h} \ccInclude{CGAL/Min_circle_2.h}
@ -52,11 +52,13 @@ primitives it uses. For example \ccc{Traits::Point} is a mapping on a
point class. Think of it as 2D points in the Euclidean plane. point class. Think of it as 2D points in the Euclidean plane.
We provide a traits class implementation using the \cgal\ 2D kernel as We provide a traits class implementation using the \cgal\ 2D kernel as
described in Section~\ref{sec:opt_traits_impl}. Traits class adapters described in Section~\ref{sec:min_circle_2_traits_impl_2D_kernel}.
to user supplied point classes are available, see Traits class adapters to user supplied point classes are available,
Section~\ref{sec:opt_traits_adapt}. Customizing own traits classes for see Sections~\ref{sec:min_circle_2_traits_adapterC2}
optimisation algorithms can be done according to the requirements for and~\ref{sec:min_circle_2_traits_adapterH2}. Customizing own traits
traits classes listed in Section~\ref{sec:opt_traits_req}. classes for optimisation algorithms can be done according to the
requirements for traits classes listed in
Section~\ref{sec:min_circle_2_traits_req}.
% ----------------------------------------------------------------------------- % -----------------------------------------------------------------------------
\ccTypes \ccTypes
@ -312,11 +314,11 @@ An object \ccVar\ is valid, iff
\item $S$ is minimal, i.e.\ no support point is redundant. \item $S$ is minimal, i.e.\ no support point is redundant.
\end{itemize} \end{itemize}
Using the traits class implementation for the \cgal\ kernel with exact Using the traits class implementation for the \cgal\ kernel with exact
arithmetic as described in Section~\ref{sec:opt_traits_impl} arithmetic as described in
guarantees validity of \ccVar. The following function is mainly Section~\ref{sec:min_circle_2_traits_impl_2D_kernel} guarantees
intended for debugging user supplied traits classes but also for validity of \ccVar. The following function is mainly intended for
convincing the anxious user that the traits class implementation is debugging user supplied traits classes but also for convincing the
correct. anxious user that the traits class implementation is correct.
\begin{ccAdvanced} \begin{ccAdvanced}
\ccMemberFunction{ bool is_valid( bool verbose = false, \ccMemberFunction{ bool is_valid( bool verbose = false,
int level = 0 ) const;}{ int level = 0 ) const;}{
@ -363,8 +365,8 @@ correct.
\ccc{CGAL_Min_ellipse_2} \ccc{CGAL_Min_ellipse_2}
\ccTexHtml{(Section~\ref{sec:min_ellipse_2_spec})}{}, \ccTexHtml{(Section~\ref{sec:min_ellipse_2_spec})}{},
\ccc{CGAL_Optimisation_traits_2} \ccc{CGAL_Min_circle_2_traits_2}
\ccTexHtml{(Section~\ref{sec:opt_traits_impl_2D_kernel})}{}, \ccTexHtml{(Section~\ref{sec:min_circle_2_traits_impl_2D_kernel})}{},
\linebreakByHand \linebreakByHand
\ccc{CGAL_Min_circle_2_adapterC2} \ccc{CGAL_Min_circle_2_adapterC2}
\ccTexHtml{(Section~\ref{sec:min_circle_2_traits_adapterC2})}{}, \ccTexHtml{(Section~\ref{sec:min_circle_2_traits_adapterC2})}{},
@ -393,13 +395,13 @@ randomization can be useful in certain cases, we give an example.
#include <CGAL/Gmpz.h> #include <CGAL/Gmpz.h>
#include <CGAL/Homogeneous.h> #include <CGAL/Homogeneous.h>
#include <CGAL/Point_2.h> #include <CGAL/Point_2.h>
#include <CGAL/Optimisation_traits_2.h> #include <CGAL/Min_circle_2_traits_2.h>
#include <CGAL/Min_circle_2.h> #include <CGAL/Min_circle_2.h>
typedef CGAL_Gmpz NT; typedef CGAL_Gmpz NT;
typedef CGAL_Homogeneous<NT> R; typedef CGAL_Homogeneous<NT> R;
typedef CGAL_Point_2<R> Point; typedef CGAL_Point_2<R> Point;
typedef CGAL_Optimisation_traits_2<R> Traits; typedef CGAL_Min_circle_2_traits_2<R> Traits;
typedef CGAL_Min_circle_2<Traits> Min_circle; typedef CGAL_Min_circle_2<Traits> Min_circle;
int main() int main()
@ -424,4 +426,16 @@ int main()
\end{ccClassTemplate} \end{ccClassTemplate}
% =============================================================================
\input{Min_circle_2_traits_2}
\input{Min_circle_2_adapterC2}
\input{Min_circle_2_adapterH2}
\input{requirements_adapterC2}
\input{requirements_adapterH2}
\input{requirements_Min_circle_2}
% ===== EOF =================================================================== % ===== EOF ===================================================================

View File

@ -39,8 +39,8 @@ $P$ may be empty or points may occur more than once. The algorithm
computes a support set $S$ which remains fixed until the next insert computes a support set $S$ which remains fixed until the next insert
or clear operation. or clear operation.
\emph{Note:} In this release correct results are only guaranteed if \emph{Note:} In this release correct results are only guaranteed if exact
exact arithmetic is used, see Section~\ref{sec:opt_traits_impl}. arithmetic is used, see Section~\ref{sec:min_ellipse_2_traits_impl_2D_kernel}.
\ccInclude{CGAL/Min_ellipse_2.h} \ccInclude{CGAL/Min_ellipse_2.h}
@ -53,11 +53,13 @@ primitives it uses. For example \ccc{Traits::Point} is a mapping on a
point class. Think of it as 2D points in the Euclidean plane. point class. Think of it as 2D points in the Euclidean plane.
We provide a traits class implementation using the \cgal\ 2D kernel as We provide a traits class implementation using the \cgal\ 2D kernel as
described in Section~\ref{sec:opt_traits_impl}. Traits class adapters described in Section~\ref{sec:min_ellipse_2_traits_impl_2D_kernel}.
to user supplied point classes are available, see Traits class adapters to user supplied point classes are available,
Section~\ref{sec:opt_traits_adapt}. Customizing own traits classes for see Sections~\ref{sec:min_ellipse_2_traits_adapterC2}
optimisation algorithms can be done according to the requirements for and~\ref{sec:min_ellipse_2_traits_adapterH2}. Customizing own traits
traits classes listed in Section~\ref{sec:opt_traits_req}. classes for optimisation algorithms can be done according to the
requirements for traits classes listed in
Section~\ref{sec:min_ellipse_2_traits_req}.
% ----------------------------------------------------------------------------- % -----------------------------------------------------------------------------
\ccTypes \ccTypes
@ -334,11 +336,11 @@ An object \ccVar\ is valid, iff
validity check. validity check.
Using the traits class implementation for the \cgal\ kernel with exact Using the traits class implementation for the \cgal\ kernel with exact
arithmetic as described in Section~\ref{sec:opt_traits_impl} arithmetic as described in
guarantees validity of \ccVar. The following function is mainly Section~\ref{sec:min_ellipse_2_traits_impl_2D_kernel} guarantees
intended for debugging user supplied traits classes but also for validity of \ccVar. The following function is mainly intended for
convincing the anxious user that the traits class implementation is debugging user supplied traits classes but also for convincing the
correct. anxious user that the traits class implementation is correct.
\begin{ccAdvanced} \begin{ccAdvanced}
\ccMemberFunction{ bool is_valid( bool verbose = false, \ccMemberFunction{ bool is_valid( bool verbose = false,
int level = 0 ) const;}{ int level = 0 ) const;}{
@ -386,8 +388,8 @@ correct.
\ccc{CGAL_Min_circle_2} \ccc{CGAL_Min_circle_2}
\ccTexHtml{(Section~\ref{sec:min_circle_2_spec})}{}, \ccTexHtml{(Section~\ref{sec:min_circle_2_spec})}{},
\ccc{CGAL_Optimisation_traits_2} \ccc{CGAL_Min_ellipse_2_traits_2}
\ccTexHtml{(Section~\ref{sec:opt_traits_impl_2D_kernel})}{}, \ccTexHtml{(Section~\ref{sec:min_ellipse_2_traits_impl_2D_kernel})}{},
\linebreakByHand \linebreakByHand
\ccc{CGAL_Min_ellipse_2_adapterC2} \ccc{CGAL_Min_ellipse_2_adapterC2}
\ccTexHtml{(Section~\ref{sec:min_ellipse_2_traits_adapterC2})}{}, \ccTexHtml{(Section~\ref{sec:min_ellipse_2_traits_adapterC2})}{},
@ -417,14 +419,14 @@ randomization can be useful in certain cases, we give an example.
#include <CGAL/Gmpz.h> #include <CGAL/Gmpz.h>
#include <CGAL/Homogeneous.h> #include <CGAL/Homogeneous.h>
#include <CGAL/Point_2.h> #include <CGAL/Point_2.h>
#include <CGAL/Optimisation_traits_2.h> #include <CGAL/Min_ellipse_2_traits_2.h>
#include <CGAL/Min_ellipse_2.h> #include <CGAL/Min_ellipse_2.h>
typedef CGAL_Gmpz NT; typedef CGAL_Gmpz NT;
typedef CGAL_Homogeneous<NT> R; typedef CGAL_Homogeneous<NT> R;
typedef CGAL_Point_2<R> Point; typedef CGAL_Point_2<R> Point;
typedef CGAL_Optimisation_traits_2<R> Traits; typedef CGAL_Min_ellipse_2_traits_2<R> Traits;
typedef CGAL_Min_ellipse_2<Traits> Min_ellipse; typedef CGAL_Min_ellipse_2<Traits> Min_ellipse;
int main() int main()
{ {
@ -448,4 +450,16 @@ int main()
\end{ccClassTemplate} \end{ccClassTemplate}
% =============================================================================
\input{Min_ellipse_2_traits_2}
\input{Min_ellipse_2_adapterC2}
\input{Min_ellipse_2_adapterH2}
\input{requirements_adapterC2}
\input{requirements_adapterH2}
\input{requirements_Min_ellipse_2}
% ===== EOF =================================================================== % ===== EOF ===================================================================

View File

@ -39,8 +39,8 @@ $P$ may be empty or points may occur more than once. The algorithm
computes a support set $S$ which remains fixed until the next insert computes a support set $S$ which remains fixed until the next insert
or clear operation. or clear operation.
\emph{Note:} In this release correct results are only guaranteed if \emph{Note:} In this release correct results are only guaranteed if exact
exact arithmetic is used, see Section~\ref{sec:opt_traits_impl}. arithmetic is used, see Section~\ref{sec:min_ellipse_2_traits_impl_2D_kernel}.
\ccInclude{CGAL/Min_ellipse_2.h} \ccInclude{CGAL/Min_ellipse_2.h}
@ -53,11 +53,13 @@ primitives it uses. For example \ccc{Traits::Point} is a mapping on a
point class. Think of it as 2D points in the Euclidean plane. point class. Think of it as 2D points in the Euclidean plane.
We provide a traits class implementation using the \cgal\ 2D kernel as We provide a traits class implementation using the \cgal\ 2D kernel as
described in Section~\ref{sec:opt_traits_impl}. Traits class adapters described in Section~\ref{sec:min_ellipse_2_traits_impl_2D_kernel}.
to user supplied point classes are available, see Traits class adapters to user supplied point classes are available,
Section~\ref{sec:opt_traits_adapt}. Customizing own traits classes for see Sections~\ref{sec:min_ellipse_2_traits_adapterC2}
optimisation algorithms can be done according to the requirements for and~\ref{sec:min_ellipse_2_traits_adapterH2}. Customizing own traits
traits classes listed in Section~\ref{sec:opt_traits_req}. classes for optimisation algorithms can be done according to the
requirements for traits classes listed in
Section~\ref{sec:min_ellipse_2_traits_req}.
% ----------------------------------------------------------------------------- % -----------------------------------------------------------------------------
\ccTypes \ccTypes
@ -334,11 +336,11 @@ An object \ccVar\ is valid, iff
validity check. validity check.
Using the traits class implementation for the \cgal\ kernel with exact Using the traits class implementation for the \cgal\ kernel with exact
arithmetic as described in Section~\ref{sec:opt_traits_impl} arithmetic as described in
guarantees validity of \ccVar. The following function is mainly Section~\ref{sec:min_ellipse_2_traits_impl_2D_kernel} guarantees
intended for debugging user supplied traits classes but also for validity of \ccVar. The following function is mainly intended for
convincing the anxious user that the traits class implementation is debugging user supplied traits classes but also for convincing the
correct. anxious user that the traits class implementation is correct.
\begin{ccAdvanced} \begin{ccAdvanced}
\ccMemberFunction{ bool is_valid( bool verbose = false, \ccMemberFunction{ bool is_valid( bool verbose = false,
int level = 0 ) const;}{ int level = 0 ) const;}{
@ -386,8 +388,8 @@ correct.
\ccc{CGAL_Min_circle_2} \ccc{CGAL_Min_circle_2}
\ccTexHtml{(Section~\ref{sec:min_circle_2_spec})}{}, \ccTexHtml{(Section~\ref{sec:min_circle_2_spec})}{},
\ccc{CGAL_Optimisation_traits_2} \ccc{CGAL_Min_ellipse_2_traits_2}
\ccTexHtml{(Section~\ref{sec:opt_traits_impl_2D_kernel})}{}, \ccTexHtml{(Section~\ref{sec:min_ellipse_2_traits_impl_2D_kernel})}{},
\linebreakByHand \linebreakByHand
\ccc{CGAL_Min_ellipse_2_adapterC2} \ccc{CGAL_Min_ellipse_2_adapterC2}
\ccTexHtml{(Section~\ref{sec:min_ellipse_2_traits_adapterC2})}{}, \ccTexHtml{(Section~\ref{sec:min_ellipse_2_traits_adapterC2})}{},
@ -417,14 +419,14 @@ randomization can be useful in certain cases, we give an example.
#include <CGAL/Gmpz.h> #include <CGAL/Gmpz.h>
#include <CGAL/Homogeneous.h> #include <CGAL/Homogeneous.h>
#include <CGAL/Point_2.h> #include <CGAL/Point_2.h>
#include <CGAL/Optimisation_traits_2.h> #include <CGAL/Min_ellipse_2_traits_2.h>
#include <CGAL/Min_ellipse_2.h> #include <CGAL/Min_ellipse_2.h>
typedef CGAL_Gmpz NT; typedef CGAL_Gmpz NT;
typedef CGAL_Homogeneous<NT> R; typedef CGAL_Homogeneous<NT> R;
typedef CGAL_Point_2<R> Point; typedef CGAL_Point_2<R> Point;
typedef CGAL_Optimisation_traits_2<R> Traits; typedef CGAL_Min_ellipse_2_traits_2<R> Traits;
typedef CGAL_Min_ellipse_2<Traits> Min_ellipse; typedef CGAL_Min_ellipse_2<Traits> Min_ellipse;
int main() int main()
{ {
@ -448,4 +450,16 @@ int main()
\end{ccClassTemplate} \end{ccClassTemplate}
% =============================================================================
\input{Min_ellipse_2_traits_2}
\input{Min_ellipse_2_adapterC2}
\input{Min_ellipse_2_adapterH2}
\input{requirements_adapterC2}
\input{requirements_adapterH2}
\input{requirements_Min_ellipse_2}
% ===== EOF =================================================================== % ===== EOF ===================================================================