diff --git a/Envelope_2/doc/Envelope_2/CGAL/envelope_2.h b/Envelope_2/doc/Envelope_2/CGAL/envelope_2.h index 5dd0d75a15f..b2a761b1dc9 100644 --- a/Envelope_2/doc/Envelope_2/CGAL/envelope_2.h +++ b/Envelope_2/doc/Envelope_2/CGAL/envelope_2.h @@ -40,6 +40,28 @@ namespace CGAL { /*! \ingroup PkgEnvelope2Ref +Computes the lower envelope of a set of \f$ x\f$-monotone curves in +\f$ \mathbb{R}^2\f$, as given by the range `[begin, end)` with the help +of the arrangement traits object `traits` responsible for their creation. +Reusing the same traits object improves speed if the traits class caches data. +The lower envelope is represented using the output minimization diagram `diag`. + +\tparam InputIterator must be an input iterator with value type `EnvelopeDiagram::X_monotone_curve_2`. +\tparam Traits must be a model of the concept `ArrangementXMonotoneTraits_2`. +\tparam EnvelopeDiagram must be a model of the concept `EnvelopeDiagram_1`. +*/ +template +void lower_envelope_x_monotone_2 +(InputIterator begin, InputIterator end, +const Traits* traits, EnvelopeDiagram& diag); + +} /* namespace CGAL */ + +namespace CGAL { + +/*! +\ingroup PkgEnvelope2Ref + Computes the upper envelope of a set of curves in \f$ \mathbb{R}^2\f$, as given by the range `[begin, end)`. The upper envelope is represented using the output maximization diagram `diag`. @@ -71,3 +93,25 @@ void upper_envelope_x_monotone_2 EnvelopeDiagram& diag); } /* namespace CGAL */ + +namespace CGAL { + +/*! +\ingroup PkgEnvelope2Ref + +Computes the upper envelope of a set of \f$ x\f$-monotone curves in +\f$ \mathbb{R}^2\f$, as given by the range `[begin, end)` with the help +of the arrangement traits object `traits` responsbile for their creation. +Reusing the same traits object improves speed if the traits class caches data. +The upper envelope is represented using the output maximization diagram `diag`. + +\tparam InputIterator must be an input iterator with value type `EnvelopeDiagram::X_monotone_curve_2`. +\tparam Traits must be a model of the concept `ArrangementXMonotoneTraits_2`. +\tparam EnvelopeDiagram must be a model of the concept `EnvelopeDiagram_1`. +*/ +template +void upper_envelope_x_monotone_2 +(InputIterator begin, InputIterator end, +const Traits* traits, EnvelopeDiagram& diag); + +} /* namespace CGAL */ diff --git a/Envelope_2/include/CGAL/envelope_2.h b/Envelope_2/include/CGAL/envelope_2.h index 2f1277e4c18..09db9e88e51 100644 --- a/Envelope_2/include/CGAL/envelope_2.h +++ b/Envelope_2/include/CGAL/envelope_2.h @@ -101,7 +101,7 @@ void lower_envelope_x_monotone_2 (InputIterator begin, InputIterator end, * \param diag Output: The minimization diagram. * \pre The value-type of the iterator is Traits::X_monotone_curve_2. */ -template +template void lower_envelope_x_monotone_2 (InputIterator begin, InputIterator end, const Traits* traits, EnvelopeDiagram& diag) { @@ -148,7 +148,7 @@ void upper_envelope_x_monotone_2 (InputIterator begin, InputIterator end, * \param diag Output: The maximization diagram. * \pre The value-type of the iterator is Traits::X_monotone_curve_2. */ -template +template void upper_envelope_x_monotone_2 (InputIterator begin, InputIterator end, const Traits* traits, EnvelopeDiagram& diag) {