Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Using ranges in point set processing?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Using ranges in point set processing?


Chronological Thread 
  • From: Frédérik Paradis <>
  • To:
  • Subject: Re: [cgal-discuss] Using ranges in point set processing?
  • Date: Tue, 3 May 2016 19:06:25 -0400
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:pkRlyhcDPg15ubU+jIo/bXrnlGMj4u6mDksu8pMizoh2WeGdxc6zYh7h7PlgxGXEQZ/co6odzbGG4ua4ACdZu96oizMrTt9lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLDjvcWKKFwSzBOGIppMbzyO5T3LsccXhYYwYo0Q8TDu5kVyRuJN2GlzLkiSlRuvru25/Zpk7jgC86l5r50IAu3Heb8lR+lYECg+KDJyo9b6sAHKCwqJ/HoVFGsM1QFZBhDMqxD8UJC2uSTzsq9x2TKRINbtHowzDD+t5qMuRB7zgzocLBY49nvWg4p+lvF1uhWk8jJlQoJVeoCWfMJ3ZKrRfMhSEWRZV9xYD3ERKp67c5cGEONHNu8O/Nq1nEcHsRbrXVrkP+jo0DId3nI=

A related question is if the CGAL Range concept
http://doc.cgal.org/latest/Circulator/classRange.html
is the way it should be, or if it has design flaws.

I don't think so because 1) one might want to pass not an entire range but a subset of it and 2) the use of InputIterator allows interoperability with other data structure than the one implemented by the STL way. I would see the use of Range as simply a sugar syntax for the InputIterator style.

Frédérik


2016-05-03 8:32 GMT-04:00 Andreas Fabri <>:

A related question is if the CGAL Range concept
http://doc.cgal.org/latest/Circulator/classRange.html
is the way it should be, or if it has design flaws.

andreas


On 03/05/2016 14:26, Simon Giraudot wrote:
Hi everybody,


The CGAL Point Set Processing package provides the user with many
algorithms, most of them using the following API:

template <typename Iterator, [...]>
void algorithm (Iterator begin, Iterator end, [...] )

The first 2 arguments are iterators that indicate where to begin and
where to stop and, in my opinion, could be easily replaced by anything
following a Range concept (
http://doc.cgal.org/4.7/Circulator/classRange.html ). It seems to me
that calling these functions always comes to doing
"algorithm(range.begin(), range.end(), ...)", so having a range-based
API "algorithm (range, ...)" would be simpler and equally generic.

Is there a good reason (other than historical) why this is not how the
API of Point Set Processing works? If not, do you think it would be
reasonable to change it this way? (provided we also keep the
iterator-based version for backward compatibility)


Thanks,


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss






Archive powered by MHonArc 2.6.18.

Top of Page