From 7f6309d71f8b0d79e722237ce1ce1843af577fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sven=20Sch=C3=B6nherr?= Date: Wed, 23 Apr 1997 12:52:59 +0000 Subject: [PATCH] Specialization for CGAL_Homogeneous with floating-point filters added --- .../Optimisation_ref/Min_circle_2.tex | 26 +++++++++++++------ .../Optimisation_ref/Min_circle_2.tex | 26 +++++++++++++------ 2 files changed, 36 insertions(+), 16 deletions(-) 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 6ab36e63277..70c879cc535 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 @@ -2,7 +2,7 @@ % The CGAL Reference Manual % Section: 2D Smallest Enclosing Circle % ----------------------------------------------------------------------------- -% file : spec/Min_circle_2.tex +% file : Library/spec/Min_circle_2.tex % author: Bernd Gärtner, Sven Schönherr (sven@inf.fu-berlin.de) % $Id$ % ============================================================================= @@ -51,9 +51,9 @@ reconstructing $mc(P)$ from a given support set $S$ of $P$. \ccConstructor{ CGAL_Min_circle_2( );}{ introduces a variable \ccVar\ of type \ccClassTemplateName. - It is initialized to - $mc($\ccTexHtml{$\emptyset$}{Ø}$)$, the empty set. - \ccPostcond \ccStyle{\ccVar.is_empty()} = \ccStyle{true}.} + It is initialized to + $mc($\ccTexHtml{$\emptyset$}{Ø}$)$, the empty set. + \ccPostcond \ccStyle{\ccVar.is_empty()} = \ccStyle{true}.} \ccHidden \ccConstructor{ CGAL_Min_circle_2( const CGAL_Min_circle_2&);}{ @@ -140,8 +140,8 @@ the construction method is incremental itself. \ccMemberFunction{ void reserve( int n);}{ reserves storage for at least \ccStyle{n} points in \ccVar. Although - this is in no case necessary, it may speed up memory allocation if - the number of points to be inserted is known in advance.} + this is in no case necessary, it may speed up memory allocation if + the number of points to be inserted is known in advance.} \ccHeading{Check operation} @@ -187,8 +187,8 @@ unbounded side equals the whole plane $\E_2$. \ccMemberFunction{ bool is_degenerate( ) const;}{ returns \ccStyle{true}, iff \ccVar\ is degenerate, i.e. if - \ccVar is empty or equal to a single point, equivalently if - the number of support points is less than 2.} + \ccVar is empty or equal to a single point, equivalently if + the number of support points is less than 2.} \ccImplementation @@ -201,6 +201,16 @@ linear time, but substantially less than computing the new smallest enclosing circle from scratch. For the member function \ccStyle{reserve} see the container \ccStyle{vector} from STL~\cite{STL}. +We provide a specialization with homogeneous representation and +numbertype \ccStyle{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 \ccStyle{} and +\ccStyle{} are included before +\ccStyle{CGAL/Min_circle_2.h>} then the specialization for +\ccStyle{CGAL_Min_circle_2>} 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 6ab36e63277..70c879cc535 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 @@ -2,7 +2,7 @@ % The CGAL Reference Manual % Section: 2D Smallest Enclosing Circle % ----------------------------------------------------------------------------- -% file : spec/Min_circle_2.tex +% file : Library/spec/Min_circle_2.tex % author: Bernd Gärtner, Sven Schönherr (sven@inf.fu-berlin.de) % $Id$ % ============================================================================= @@ -51,9 +51,9 @@ reconstructing $mc(P)$ from a given support set $S$ of $P$. \ccConstructor{ CGAL_Min_circle_2( );}{ introduces a variable \ccVar\ of type \ccClassTemplateName. - It is initialized to - $mc($\ccTexHtml{$\emptyset$}{Ø}$)$, the empty set. - \ccPostcond \ccStyle{\ccVar.is_empty()} = \ccStyle{true}.} + It is initialized to + $mc($\ccTexHtml{$\emptyset$}{Ø}$)$, the empty set. + \ccPostcond \ccStyle{\ccVar.is_empty()} = \ccStyle{true}.} \ccHidden \ccConstructor{ CGAL_Min_circle_2( const CGAL_Min_circle_2&);}{ @@ -140,8 +140,8 @@ the construction method is incremental itself. \ccMemberFunction{ void reserve( int n);}{ reserves storage for at least \ccStyle{n} points in \ccVar. Although - this is in no case necessary, it may speed up memory allocation if - the number of points to be inserted is known in advance.} + this is in no case necessary, it may speed up memory allocation if + the number of points to be inserted is known in advance.} \ccHeading{Check operation} @@ -187,8 +187,8 @@ unbounded side equals the whole plane $\E_2$. \ccMemberFunction{ bool is_degenerate( ) const;}{ returns \ccStyle{true}, iff \ccVar\ is degenerate, i.e. if - \ccVar is empty or equal to a single point, equivalently if - the number of support points is less than 2.} + \ccVar is empty or equal to a single point, equivalently if + the number of support points is less than 2.} \ccImplementation @@ -201,6 +201,16 @@ linear time, but substantially less than computing the new smallest enclosing circle from scratch. For the member function \ccStyle{reserve} see the container \ccStyle{vector} from STL~\cite{STL}. +We provide a specialization with homogeneous representation and +numbertype \ccStyle{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 \ccStyle{} and +\ccStyle{} are included before +\ccStyle{CGAL/Min_circle_2.h>} then the specialization for +\ccStyle{CGAL_Min_circle_2>} is used instead +of the generic implementation. + \ccExample