Address comments

This commit is contained in:
Ahmed Essam 2020-08-25 13:43:49 +02:00
parent 5e7a5e73f2
commit a46398db32
2 changed files with 14 additions and 14 deletions

View File

@ -47,13 +47,13 @@ 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`.
\tparam Traits must be a model of the concept `ArrangementXMonotoneTraits_2`.
*/
template<class InputIterator, class Traits, class EnvelopeDiagram>
template<class InputIterator, class EnvelopeDiagram, class Traits>
void lower_envelope_x_monotone_2
(InputIterator begin, InputIterator end,
const Traits* traits, EnvelopeDiagram& diag);
EnvelopeDiagram& diag, const Traits& traits);
} /* namespace CGAL */
@ -106,12 +106,12 @@ 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`.
\tparam Traits must be a model of the concept `ArrangementXMonotoneTraits_2`.
*/
template<class InputIterator, class Traits, class EnvelopeDiagram>
template<class InputIterator, class EnvelopeDiagram, class Traits>
void upper_envelope_x_monotone_2
(InputIterator begin, InputIterator end,
const Traits* traits, EnvelopeDiagram& diag);
EnvelopeDiagram& diag, const Traits& traits);
} /* namespace CGAL */

View File

@ -97,18 +97,18 @@ void lower_envelope_x_monotone_2 (InputIterator begin, InputIterator end,
* Compute the lower envelope of a range of x-monotone curves.
* \param begin An iterator for the first x-monotone curve.
* \param end A past-the-end iterator for the x-monotone curves.
* \param traits The arrangement traits responsible for the x-monotone curves
* \param diag Output: The minimization diagram.
* \param traits The arrangement traits responsible for the x-monotone curves.
* \pre The value-type of the iterator is Traits::X_monotone_curve_2.
*/
template <class InputIterator, class Traits, class EnvelopeDiagram>
template <class InputIterator, class EnvelopeDiagram, class Traits>
void lower_envelope_x_monotone_2 (InputIterator begin, InputIterator end,
const Traits* traits, EnvelopeDiagram& diag)
EnvelopeDiagram& diag, const Traits& traits)
{
typedef typename EnvelopeDiagram::Traits_2 Traits_2;
typedef Envelope_divide_and_conquer_2<Traits_2, EnvelopeDiagram> Envelope_2;
Envelope_2 env{traits};
Envelope_2 env{&traits};
env.insert_x_monotone_curves (begin, end,
true, // Lower envelope.
@ -144,18 +144,18 @@ void upper_envelope_x_monotone_2 (InputIterator begin, InputIterator end,
* Compute the upper envelope of a range of x-monotone curves.
* \param begin An iterator for the first x-monotone curve.
* \param end A past-the-end iterator for the x-monotone curves.
* \param traits The arrangement traits responsible for the x-monotone curves
* \param diag Output: The maximization diagram.
* \param traits The arrangement traits responsible for the x-monotone curves.
* \pre The value-type of the iterator is Traits::X_monotone_curve_2.
*/
template <class InputIterator, class Traits, class EnvelopeDiagram>
template <class InputIterator, class EnvelopeDiagram, class Traits>
void upper_envelope_x_monotone_2 (InputIterator begin, InputIterator end,
const Traits* traits, EnvelopeDiagram& diag)
EnvelopeDiagram& diag, const Traits& traits)
{
typedef typename EnvelopeDiagram::Traits_2 Traits_2;
typedef Envelope_divide_and_conquer_2<Traits_2, EnvelopeDiagram> Envelope_2;
Envelope_2 env{traits};
Envelope_2 env{&traits};
env.insert_x_monotone_curves (begin, end,
false, // Upper envelope.