diff --git a/Packages/Min_circle_2/doc_tex/Optimisation/Optimisation_ref/Min_circle_2.tex b/Packages/Min_circle_2/doc_tex/Optimisation/Optimisation_ref/Min_circle_2.tex index b6843b69448..876d9283f74 100644 --- a/Packages/Min_circle_2/doc_tex/Optimisation/Optimisation_ref/Min_circle_2.tex +++ b/Packages/Min_circle_2/doc_tex/Optimisation/Optimisation_ref/Min_circle_2.tex @@ -19,8 +19,9 @@ An object of the class \ccClassTemplateName\ is the unique circle of smallest area enclosing a finite set of points in two-dimensional euclidean space $\E_2$. For a point set $P$ we denote by $mc(P)$ the smallest circle that contains all points of $P$. Note that $mc(P)$ can -be degenerate, i.e.\ $mc(P)=$\ccTexHtml{$\;\emptyset$}{Ø} if -$P=$\ccTexHtml{$\;\emptyset$}{Ø} and $mc(P)=\{p\}$ if $P=\{p\}$. +be degenerate, i.e.\ $mc(P)=\mbox{\ccTexHtml{$\;\emptyset$}{Ø}}$ +if $P=\mbox{\ccTexHtml{$\;\emptyset$}{Ø}}$ and $mc(P)=\{p\}$ if +$P=\{p\}$. An inclusion-minimal subset $S$ of $P$ with $mc(S)=mc(P)$ is called a {\em support set}, the points in $S$ are the {\em support points}. A @@ -58,10 +59,15 @@ requirements for interface classes listed in Section~\ref{sec:opt_I_Req}. \ccNestedType{I}{Interface type.} \ccGlueBegin -\ccTypedef{typedef I::Point Point; }{Point type.} -\ccTypedef{typedef I::Circle Circle;}{Circle type.} +\ccUnchecked +\ccTypedef{typedef I::Point Point; }{Point type.} +\ccUnchecked +\ccTypedef{typedef I::Distance Distance;}{Distance type.} \ccGlueEnd +\ccUnchecked +\ccTypedef{typedef I::Circle Circle; }{Circle type.} + The following types denote iterators that allow to traverse all points and support points of the smallest enclosing circle, resp. The iterators are non-mutable and their value type is \ccc{Point}. The @@ -87,9 +93,10 @@ reconstructing $mc(P)$ from a given support set $S$ of $P$. \ccConstructor{ CGAL_Min_circle_2( I const& i = I());}{ introduces a variable \ccVar\ of type \ccClassTemplateName. It is initialized to - $mc($\ccTexHtml{$\emptyset$}{Ø}$)$, the empty set. - \ccPostcond \ccc{\ccVar.is_empty()} = \ccc{true}.} + $mc(\mbox{\ccTexHtml{$\emptyset$}{Ø}})$, the empty set. + \ccPostcond \ccVar\ccc{.is_empty()} = \ccc{true}.} +\ccUnchecked \ccHidden \ccConstructor{ CGAL_Min_circle_2( CGAL_Min_circle_2 const&);}{ copy constructor.} @@ -97,7 +104,7 @@ reconstructing $mc(P)$ from a given support set $S$ of $P$. \ccConstructor{ CGAL_Min_circle_2( Point const& p, I const& i = I());}{ introduces a variable \ccVar\ of type \ccClassTemplateName. It is initialized to $mc(\{p\})$, the set $\{p\}$. - \ccPostcond \ccc{\ccVar.is_degenerate()} = \ccc{true}.} + \ccPostcond \ccVar\ccc{.is_degenerate()} = \ccc{true}.} \ccConstructor{ CGAL_Min_circle_2( Point const& p1, Point const& p2, @@ -157,6 +164,7 @@ for the STL sequence containers \ccc{vector} and \ccc{list}. \ccConstructor{ ~CGAL_Min_circle_2( );}{ destructor.} +\ccUnchecked \ccHidden \ccMemberFunction{ CGAL_Min_circle_2& operator = ( CGAL_Min_circle_2 const&);}{ @@ -183,16 +191,17 @@ for the STL sequence containers \ccc{vector} and \ccc{list}. \ccMemberFunction{ Support_point_iterator support_points_end() const;}{ returns the corresponding past-the-end iterator.} -\ccMemberFunction{ Point const& support_point( int i) const;}{ +\ccMemberFunction{ Point const& support_point( int i) const;}{ returns the \ccc{i}-th support point of \ccVar. Between two - insert operations any call to \ccc{\ccVar.support_point(i)} + insert operations any call to \ccVar\ccc{.support_point(i)} with the same \ccc{i} returns the same point. - \ccPrecond $0 \leq i <$ \ccc{\ccVar.number_of_support_points()}.} + \ccPrecond $0 \leq i <$ \ccVar\ccc{.number_of_support_points()}.} + +\ccMemberFunction{ Circle circle( ) const;}{ + returns a circle with same center and same squared radius + as \ccVar, if \ccVar is not empty. Otherwise the default + circle, i.e.\ \ccc{Circle()}, is returned.} -\ccMemberFunction{ Circle const& circle( ) const;}{ - returns an oriented circle with same center $c$ and same - squared radius $r$ as \ccVar\ and positive orientation. - \ccPrecond \ccc{\ccVar.is_empty()} = \ccc{false}.} % ----------------------------------------------------------------------------- \ccPredicates @@ -227,7 +236,7 @@ bounded side, i.e.\ its unbounded side equals the whole plane $\E_2$. the number of support points is less than 2.} % ----------------------------------------------------------------------------- -\ccModifiers +\ccHeading{Modifiers} New points can be added to an existing $\ccVar$, allowing to build $mc(P)$ incrementally, e.g.\ if $P$ is not known in advance. Compared @@ -243,9 +252,9 @@ the construction method is incremental itself. An object \ccVar\ is valid, iff \begin{itemize} - \item[a)] \ccVar\ contains all points of its defining set $P$, - \item[b)] \ccVar\ is the smallest circle spanned by its support set $S$, and - \item[c)] $S$ is minimal, i.e.\ no support point is redundant. + \item \ccVar\ contains all points of its defining set $P$, + \item \ccVar\ is the smallest circle spanned by its support set $S$, and + \item $S$ is minimal, i.e.\ no support point is redundant. \end{itemize} Using the ready-made implementation for the interface class with exact arithmetic as described in Section~\ref{sec:opt_I_Impl} guarantees @@ -268,7 +277,8 @@ debugging user supplied interface classes. \ccFunction{ ostream& operator << ( ostream& os, CGAL_Min_circle_2 const& min_circle);}{ writes \ccVar\ to output stream \ccc{os}. - \ccPrecond The output operator is defined for \ccc{I::Point}.} + \ccPrecond The output operator is defined for \ccc{I::Point} + (and for \ccc{I::Circle}, if pretty printing is used).} \ccFunction{ istream& operator >> ( istream& is, CGAL_Min_circle_2 &min_circle);}{ @@ -277,6 +287,7 @@ debugging user supplied interface classes. \ccInclude{CGAL/IO/Window_stream.h} +\ccUnchecked \ccFunction{ CGAL_Window_stream& operator << ( CGAL_Window_stream& ws, CGAL_Min_circle_2 const& min_circle);}{ @@ -295,17 +306,6 @@ linear time, but substantially less than computing the new smallest enclosing circle from scratch. The check for validity takes linear time. -%We provide a specialization with homogeneous representation and -%numbertype \ccc{integer} that uses floating-point filter for the sign -%calculations in the predicates (see~\cite{MehlhornNaeher94}). This -%decreaes computation time by a factor of four compared to the generic -%implementation. If both \ccc{} and -%\ccc{} are included before -%\ccc{} then the specialization for -%\ccc{CGAL_Min_circle_2< CGAL_Optimisation_default_interface< -% CGAL_Homogeneous > >} is used instead of the generic -%implementation. - % ----------------------------------------------------------------------------- \ccExample diff --git a/Packages/Min_circle_2/doc_tex/basic/Optimisation/Optimisation_ref/Min_circle_2.tex b/Packages/Min_circle_2/doc_tex/basic/Optimisation/Optimisation_ref/Min_circle_2.tex index b6843b69448..876d9283f74 100644 --- a/Packages/Min_circle_2/doc_tex/basic/Optimisation/Optimisation_ref/Min_circle_2.tex +++ b/Packages/Min_circle_2/doc_tex/basic/Optimisation/Optimisation_ref/Min_circle_2.tex @@ -19,8 +19,9 @@ An object of the class \ccClassTemplateName\ is the unique circle of smallest area enclosing a finite set of points in two-dimensional euclidean space $\E_2$. For a point set $P$ we denote by $mc(P)$ the smallest circle that contains all points of $P$. Note that $mc(P)$ can -be degenerate, i.e.\ $mc(P)=$\ccTexHtml{$\;\emptyset$}{Ø} if -$P=$\ccTexHtml{$\;\emptyset$}{Ø} and $mc(P)=\{p\}$ if $P=\{p\}$. +be degenerate, i.e.\ $mc(P)=\mbox{\ccTexHtml{$\;\emptyset$}{Ø}}$ +if $P=\mbox{\ccTexHtml{$\;\emptyset$}{Ø}}$ and $mc(P)=\{p\}$ if +$P=\{p\}$. An inclusion-minimal subset $S$ of $P$ with $mc(S)=mc(P)$ is called a {\em support set}, the points in $S$ are the {\em support points}. A @@ -58,10 +59,15 @@ requirements for interface classes listed in Section~\ref{sec:opt_I_Req}. \ccNestedType{I}{Interface type.} \ccGlueBegin -\ccTypedef{typedef I::Point Point; }{Point type.} -\ccTypedef{typedef I::Circle Circle;}{Circle type.} +\ccUnchecked +\ccTypedef{typedef I::Point Point; }{Point type.} +\ccUnchecked +\ccTypedef{typedef I::Distance Distance;}{Distance type.} \ccGlueEnd +\ccUnchecked +\ccTypedef{typedef I::Circle Circle; }{Circle type.} + The following types denote iterators that allow to traverse all points and support points of the smallest enclosing circle, resp. The iterators are non-mutable and their value type is \ccc{Point}. The @@ -87,9 +93,10 @@ reconstructing $mc(P)$ from a given support set $S$ of $P$. \ccConstructor{ CGAL_Min_circle_2( I const& i = I());}{ introduces a variable \ccVar\ of type \ccClassTemplateName. It is initialized to - $mc($\ccTexHtml{$\emptyset$}{Ø}$)$, the empty set. - \ccPostcond \ccc{\ccVar.is_empty()} = \ccc{true}.} + $mc(\mbox{\ccTexHtml{$\emptyset$}{Ø}})$, the empty set. + \ccPostcond \ccVar\ccc{.is_empty()} = \ccc{true}.} +\ccUnchecked \ccHidden \ccConstructor{ CGAL_Min_circle_2( CGAL_Min_circle_2 const&);}{ copy constructor.} @@ -97,7 +104,7 @@ reconstructing $mc(P)$ from a given support set $S$ of $P$. \ccConstructor{ CGAL_Min_circle_2( Point const& p, I const& i = I());}{ introduces a variable \ccVar\ of type \ccClassTemplateName. It is initialized to $mc(\{p\})$, the set $\{p\}$. - \ccPostcond \ccc{\ccVar.is_degenerate()} = \ccc{true}.} + \ccPostcond \ccVar\ccc{.is_degenerate()} = \ccc{true}.} \ccConstructor{ CGAL_Min_circle_2( Point const& p1, Point const& p2, @@ -157,6 +164,7 @@ for the STL sequence containers \ccc{vector} and \ccc{list}. \ccConstructor{ ~CGAL_Min_circle_2( );}{ destructor.} +\ccUnchecked \ccHidden \ccMemberFunction{ CGAL_Min_circle_2& operator = ( CGAL_Min_circle_2 const&);}{ @@ -183,16 +191,17 @@ for the STL sequence containers \ccc{vector} and \ccc{list}. \ccMemberFunction{ Support_point_iterator support_points_end() const;}{ returns the corresponding past-the-end iterator.} -\ccMemberFunction{ Point const& support_point( int i) const;}{ +\ccMemberFunction{ Point const& support_point( int i) const;}{ returns the \ccc{i}-th support point of \ccVar. Between two - insert operations any call to \ccc{\ccVar.support_point(i)} + insert operations any call to \ccVar\ccc{.support_point(i)} with the same \ccc{i} returns the same point. - \ccPrecond $0 \leq i <$ \ccc{\ccVar.number_of_support_points()}.} + \ccPrecond $0 \leq i <$ \ccVar\ccc{.number_of_support_points()}.} + +\ccMemberFunction{ Circle circle( ) const;}{ + returns a circle with same center and same squared radius + as \ccVar, if \ccVar is not empty. Otherwise the default + circle, i.e.\ \ccc{Circle()}, is returned.} -\ccMemberFunction{ Circle const& circle( ) const;}{ - returns an oriented circle with same center $c$ and same - squared radius $r$ as \ccVar\ and positive orientation. - \ccPrecond \ccc{\ccVar.is_empty()} = \ccc{false}.} % ----------------------------------------------------------------------------- \ccPredicates @@ -227,7 +236,7 @@ bounded side, i.e.\ its unbounded side equals the whole plane $\E_2$. the number of support points is less than 2.} % ----------------------------------------------------------------------------- -\ccModifiers +\ccHeading{Modifiers} New points can be added to an existing $\ccVar$, allowing to build $mc(P)$ incrementally, e.g.\ if $P$ is not known in advance. Compared @@ -243,9 +252,9 @@ the construction method is incremental itself. An object \ccVar\ is valid, iff \begin{itemize} - \item[a)] \ccVar\ contains all points of its defining set $P$, - \item[b)] \ccVar\ is the smallest circle spanned by its support set $S$, and - \item[c)] $S$ is minimal, i.e.\ no support point is redundant. + \item \ccVar\ contains all points of its defining set $P$, + \item \ccVar\ is the smallest circle spanned by its support set $S$, and + \item $S$ is minimal, i.e.\ no support point is redundant. \end{itemize} Using the ready-made implementation for the interface class with exact arithmetic as described in Section~\ref{sec:opt_I_Impl} guarantees @@ -268,7 +277,8 @@ debugging user supplied interface classes. \ccFunction{ ostream& operator << ( ostream& os, CGAL_Min_circle_2 const& min_circle);}{ writes \ccVar\ to output stream \ccc{os}. - \ccPrecond The output operator is defined for \ccc{I::Point}.} + \ccPrecond The output operator is defined for \ccc{I::Point} + (and for \ccc{I::Circle}, if pretty printing is used).} \ccFunction{ istream& operator >> ( istream& is, CGAL_Min_circle_2 &min_circle);}{ @@ -277,6 +287,7 @@ debugging user supplied interface classes. \ccInclude{CGAL/IO/Window_stream.h} +\ccUnchecked \ccFunction{ CGAL_Window_stream& operator << ( CGAL_Window_stream& ws, CGAL_Min_circle_2 const& min_circle);}{ @@ -295,17 +306,6 @@ linear time, but substantially less than computing the new smallest enclosing circle from scratch. The check for validity takes linear time. -%We provide a specialization with homogeneous representation and -%numbertype \ccc{integer} that uses floating-point filter for the sign -%calculations in the predicates (see~\cite{MehlhornNaeher94}). This -%decreaes computation time by a factor of four compared to the generic -%implementation. If both \ccc{} and -%\ccc{} are included before -%\ccc{} then the specialization for -%\ccc{CGAL_Min_circle_2< CGAL_Optimisation_default_interface< -% CGAL_Homogeneous > >} is used instead of the generic -%implementation. - % ----------------------------------------------------------------------------- \ccExample