diff --git a/Packages/Point_set_2/changes.txt b/Packages/Point_set_2/changes.txt index d253693f3d6..49d229b803c 100644 --- a/Packages/Point_set_2/changes.txt +++ b/Packages/Point_set_2/changes.txt @@ -1,3 +1,5 @@ +2.3.1 docs changed (range_search variants added) + 2.3 Unique_hash_map used new range_search variants added (not yet documented) some demos added diff --git a/Packages/Point_set_2/doc_tex/Point_set_2_ref/range_search.tex b/Packages/Point_set_2/doc_tex/Point_set_2_ref/range_search.tex index 5745c8183dd..96ba70fdd77 100644 --- a/Packages/Point_set_2/doc_tex/Point_set_2_ref/range_search.tex +++ b/Packages/Point_set_2/doc_tex/Point_set_2_ref/range_search.tex @@ -2,10 +2,14 @@ \ccDefinition -There are three versions of the function template \ccRefName\ that -perform range searches on Delaunay triangulations. The frst performs +There are six versions of the function template \ccRefName\ that +perform range searches on Delaunay triangulations. The first performs circular range searches, the second triangular range searches and the -third performs iso-rectangular range searches. +third performs iso-rectangular range searches. The other three range search +function templates perform enhanced variants of the three beforementioned +operations.\\ +They get a user-defined object that has to control the range search operation. +This way one can for instance stop the search, when $n$ points were found. \ccInclude{CGAL/range_search_delaunay_2.h} @@ -94,6 +98,69 @@ the Delaunay triangulation data type: \item \ccc{Dt::Geom_traits::Construct_circle_2} \end{itemize} + +\ccFunction{template + OutputIterator range_search(Dt& delau, const Circle& C, OutputIterator res, + Pred& pred, bool return_if_succeded);} +{ computes handles to all vertices contained in the closure of disk $C$. +The computed vertex handles will be placed as a sequence of objects in a container of value type +of $res$ +which points to the first object in the sequence. The function +returns an output iterator pointing to the position beyond the end +of the sequence. +$delau$ is the \cgal\ Delaunay triangulation on that we perform the range search operation. +$pred$ controls the search operation. If $return\_if\_succeded$ is $true$, we will end the search +after the first success of the predicate, otherwise we will continue till the search is finished.} + +\ccHeading{Requirements} +For the requirements of \ccc{Dt} see the description for the non-predicate version.\\ +Requirements of \ccc{Pred}: +\begin{itemize} + \item \ccc{void set_result(bool);} + \item \ccc{bool operator()(const Point&);} +\end{itemize} +The \ccc{operator()} is used for testing the current point in the search operation. +If this operator returns $true$ and $return\_if\_succeded$ is $true$, the range search will stop. +Otherwise the range search operation will continue. Member function $set\_result$ can be used to +store the result of the range search in the function object. The result will be $true$ if the last +call to the \ccc{operator()} of the predicate returned $true$, $false$ otherwise. + +\ccFunction{template + OutputIterator range_search(Dt& delau, const Dt::Point& a, const Dt::Point& b, + const Dt::Point& c,OutputIterator res, Pred& pred, bool return_if_succeded);} +{computes handles to all vertices contained in the closure of the triangle $(a,b,c)$.\\ +\ccPrecond $a$, $b$, and $c$ must not be collinear. +The computed vertex handles will be placed as a sequence of objects in a container of value type +of $res$ +which points to the first object in the sequence. The function +returns an output iterator pointing to the position beyond the end +of the sequence. +$delau$ is the \cgal\ Delaunay triangulation on which we perform the range search operation. +$pred$ controls the search operation. If $return\_if\_succeded$ is $true$, we will end the search +after the first success of the predicate, otherwise we will continue till the search is finished.} + +\ccHeading{Requirements} +For the requirements of \ccc{Dt} see the description for the non-predicate version.\\ +For the requirements of \ccc{Pred} see the description above. \\ + +\ccFunction{template + OutputIterator range_search(Dt& delau, const Dt::Point& a, const Dt::Point& b, const Dt::Point& c,const Dt::Point& d, + OutputIterator res, Pred& pred, bool return_if_succeded);} +{computes handles to all vertices contained in the closure of the iso-rectangle $(a,b,c,d)$.\\ +\ccPrecond $a$ is the upper left point, $b$ the lower left, $c$ the lower +right and $d$ the upper right point of the iso rectangle. +The computed vertex handles will be placed as a sequence of objects in a container of value type +of $res$ +which points to the first object in the sequence. The function +returns an output iterator pointing to the position beyond the end +of the sequence. $delau$ is the \cgal\ Delaunay triangulation on which we perform the range search operation. +$pred$ controls the search operation. If $return\_if\_succeded$ is $true$, we will end the search +after the first success of the predicate, otherwise we will continue till the search is finished.} + +\ccHeading{Requirements} +For the requirements of \ccc{Dt} see the description for the non-predicate version.\\ +For the requirements of \ccc{Pred} see the description above. \\ + \end{ccRefFunction} diff --git a/Packages/Point_set_2/doc_tex/basic/Point_set_2_ref/range_search.tex b/Packages/Point_set_2/doc_tex/basic/Point_set_2_ref/range_search.tex index 5745c8183dd..96ba70fdd77 100644 --- a/Packages/Point_set_2/doc_tex/basic/Point_set_2_ref/range_search.tex +++ b/Packages/Point_set_2/doc_tex/basic/Point_set_2_ref/range_search.tex @@ -2,10 +2,14 @@ \ccDefinition -There are three versions of the function template \ccRefName\ that -perform range searches on Delaunay triangulations. The frst performs +There are six versions of the function template \ccRefName\ that +perform range searches on Delaunay triangulations. The first performs circular range searches, the second triangular range searches and the -third performs iso-rectangular range searches. +third performs iso-rectangular range searches. The other three range search +function templates perform enhanced variants of the three beforementioned +operations.\\ +They get a user-defined object that has to control the range search operation. +This way one can for instance stop the search, when $n$ points were found. \ccInclude{CGAL/range_search_delaunay_2.h} @@ -94,6 +98,69 @@ the Delaunay triangulation data type: \item \ccc{Dt::Geom_traits::Construct_circle_2} \end{itemize} + +\ccFunction{template + OutputIterator range_search(Dt& delau, const Circle& C, OutputIterator res, + Pred& pred, bool return_if_succeded);} +{ computes handles to all vertices contained in the closure of disk $C$. +The computed vertex handles will be placed as a sequence of objects in a container of value type +of $res$ +which points to the first object in the sequence. The function +returns an output iterator pointing to the position beyond the end +of the sequence. +$delau$ is the \cgal\ Delaunay triangulation on that we perform the range search operation. +$pred$ controls the search operation. If $return\_if\_succeded$ is $true$, we will end the search +after the first success of the predicate, otherwise we will continue till the search is finished.} + +\ccHeading{Requirements} +For the requirements of \ccc{Dt} see the description for the non-predicate version.\\ +Requirements of \ccc{Pred}: +\begin{itemize} + \item \ccc{void set_result(bool);} + \item \ccc{bool operator()(const Point&);} +\end{itemize} +The \ccc{operator()} is used for testing the current point in the search operation. +If this operator returns $true$ and $return\_if\_succeded$ is $true$, the range search will stop. +Otherwise the range search operation will continue. Member function $set\_result$ can be used to +store the result of the range search in the function object. The result will be $true$ if the last +call to the \ccc{operator()} of the predicate returned $true$, $false$ otherwise. + +\ccFunction{template + OutputIterator range_search(Dt& delau, const Dt::Point& a, const Dt::Point& b, + const Dt::Point& c,OutputIterator res, Pred& pred, bool return_if_succeded);} +{computes handles to all vertices contained in the closure of the triangle $(a,b,c)$.\\ +\ccPrecond $a$, $b$, and $c$ must not be collinear. +The computed vertex handles will be placed as a sequence of objects in a container of value type +of $res$ +which points to the first object in the sequence. The function +returns an output iterator pointing to the position beyond the end +of the sequence. +$delau$ is the \cgal\ Delaunay triangulation on which we perform the range search operation. +$pred$ controls the search operation. If $return\_if\_succeded$ is $true$, we will end the search +after the first success of the predicate, otherwise we will continue till the search is finished.} + +\ccHeading{Requirements} +For the requirements of \ccc{Dt} see the description for the non-predicate version.\\ +For the requirements of \ccc{Pred} see the description above. \\ + +\ccFunction{template + OutputIterator range_search(Dt& delau, const Dt::Point& a, const Dt::Point& b, const Dt::Point& c,const Dt::Point& d, + OutputIterator res, Pred& pred, bool return_if_succeded);} +{computes handles to all vertices contained in the closure of the iso-rectangle $(a,b,c,d)$.\\ +\ccPrecond $a$ is the upper left point, $b$ the lower left, $c$ the lower +right and $d$ the upper right point of the iso rectangle. +The computed vertex handles will be placed as a sequence of objects in a container of value type +of $res$ +which points to the first object in the sequence. The function +returns an output iterator pointing to the position beyond the end +of the sequence. $delau$ is the \cgal\ Delaunay triangulation on which we perform the range search operation. +$pred$ controls the search operation. If $return\_if\_succeded$ is $true$, we will end the search +after the first success of the predicate, otherwise we will continue till the search is finished.} + +\ccHeading{Requirements} +For the requirements of \ccc{Dt} see the description for the non-predicate version.\\ +For the requirements of \ccc{Pred} see the description above. \\ + \end{ccRefFunction} diff --git a/Packages/Point_set_2/version b/Packages/Point_set_2/version index b71bbc467c9..6b85bc6a54a 100644 --- a/Packages/Point_set_2/version +++ b/Packages/Point_set_2/version @@ -1 +1 @@ -2.3 (16 Nov 2001) +2.3.1 (03 Dec 2001)