% =============================================================================
% The CGAL Reference Manual
% Chapter: Geometric Optimisation
% -----------------------------------------------------------------------------
% file  : doc_tex/basic/Optimisation/main.tex
% author: Bernd Gärtner, Sven Schönherr <sven@inf.fu-berlin.de>
% -----------------------------------------------------------------------------
% $CGAL_Package: Optimisation_basic WIP $
% $Revision$
% $Date$
% =============================================================================

\newcommand{\linebreakByHand}{\ccTexHtml{\linebreak[4]}{}}
\newcommand{  \newlineByHand}{\ccTexHtml{\\}{}}
\newcommand{\SaveSpaceByHand}{}  %%%% [2]{\ccTexHtml{#1}{#2}}

\chapter{Geometric Optimisation} \label{Optimisation}

\ccChapterRelease{Release: WIP (\today)}

\ccChapterAuthor{Bernd G{\"a}rtner}\ccTexHtml{\\}{<BR>}
\ccChapterAuthor{Michael Hoffmann}\ccTexHtml{\\}{<BR>}
\ccChapterAuthor{Sven Sch{\"o}nherr}

\ccTexHtml{\thispagestyle{empty}}{}

\begin{ccTexOnly}\section*{Introduction}\end{ccTexOnly}
\begin{ccHtmlOnly}<H2>Introduction</H2><P>\end{ccHtmlOnly}

This chapter describes routines for solving geometric optimisation
problems.

The first three sections contain algorithms for computing and updating the
\begin{itemize}
  \item smallest enclosing circle (2D)
    (Section~\ref{sec:smallest_enclosing_circles}), the
  \item smallest enclosing ellipse (2D)
    (Section~\ref{sec:smallest_enclosing_ellipses}), and the
  \item smallest enclosing sphere (dD)
    (Section~\ref{sec:smallest_enclosing_spheres}), respectively,
\end{itemize}
of a finite point set.

Section~\ref{secOOPS} describes several functions to compute the smallest
enclosing region $r$ of a planar convex polygon $P$ where $r$ is to be chosen
from a set $\mathcal{R}$ of candidate regions.

The remaining sections describe algorithms for searching in matrices with
specific properties and some applications.  In particular, there are general
implementations of
\begin{itemize}
  \item monotone matrix search (Section~\ref{secMonotoneMatrixSearch}),
    which can be applied to compute
    \begin{itemize}
      \item extremal polygons of a convex polygon
        (Section~\ref{secComputingExtremalPolygons}) \textit{or}
      \item all furthest neighbors for the vertices of a convex polygon
        (Section~\ref{secAllFurthestNeighbors}),
    \end{itemize}
  \item and sorted matrix search (Section~\ref{secSortedMatrixSearch}),
    which can be used to compute the $p$-centers of a planar point set
    (Section~\ref{sec_RectangularPCenters}).
\end{itemize}

\subsubsection*{Traits Class}
The class and function templates are parameterized with a traits class
which defines the abstract interface between the optimisation
algorithm and the primitives it uses. We provide traits class
implementations that interface the optimisation algorithms with the
\cgal\ kernel. For some algorithms, in addition, we provide traits
class adapters to user supplied point classes. Finally, we describe
the requirements that must be fulfilled by traits classes for
optimisation algorithms.  This is at the same time a specification for
using the provided traits class implementations as for users who want
to supply their own traits class.

\subsubsection*{Assertions}
The optimisation code uses infix \ccc{OPTIMISATION} in the assertions,
e.g.\ defining the compiler flag
\ccc{CGAL_OPTIMISATION_NO_PRECONDITIONS} switches precondition
checking off, cf.~\cgalReferToAssertions

\newcommand{\cgalSetOptTraitsAdaptReqLayout}{\ccTexHtml{%
    \ccSetThreeColumns{Oriented_side}{da.get_hw( Point p).}{}
    \ccPropagateThreeToTwoColumns}{}}

\input{smallest_enclosing_circles}

\input{smallest_enclosing_ellipses}

\input{smallest_enclosing_spheres}

\input{spec_oops}

\input{spec_extremal_polygons}
 
\input{spec_all_furthest_neighbors}
 
\input{spec_rectangular_p_centers}
 
\input{spec_monotone_matrix_search}
 
\input{spec_sorted_matrix_search}

\cgalColumnLayout

% ===== EOF ===================================================================
