[iterator] Orbiting iterators
Hi, just wondering what the mood in Boost.Iterator is for new features? At work we recently found use for an orbiting iterator, specifically a circular one, which effectively wraps at the start/end of a bounded range. (The domain is digital signal processing.) Implementation details aside, does this feature sound desirable to the library? I call it an "orbiting" iterator because it is a specific (and useful) case of the more general rho-shaped orbiting iterator. The theory behind it is in chapter 2 of Elements of Programming, which happens to be the free sample chapter available: http://elementsofprogramming.com/032163537X_Sample.pdf#page=6 Anyway, if there is interest, I'll make a pull request. Cheers. Jeremy
On Sunday, November 20, 2016 8:25:20 PM CST Jeremy Murphy wrote:
Hi,
just wondering what the mood in Boost.Iterator is for new features? At work we recently found use for an orbiting iterator, specifically a circular one, which effectively wraps at the start/end of a bounded range. (The domain is digital signal processing.)
That sounds like what CGAL calls a Circulator; c.f. http://doc.cgal.org/ latest/Circulator/classCirculator.html
Implementation details aside, does this feature sound desirable to the library?
I've found these handy when iterating through graph edges incident on a vertex, when you need to start on a specific edge. It's been ages since I've used them so I can't recall the exact use case. Makes me wonder whether something like this already exists in boost graph. -Steve
On 11/20/16 8:01 AM, Steve M. Robbins wrote:
On Sunday, November 20, 2016 8:25:20 PM CST Jeremy Murphy wrote:
Hi,
just wondering what the mood in Boost.Iterator is for new features? At work we recently found use for an orbiting iterator, specifically a circular one, which effectively wraps at the start/end of a bounded range. (The domain is digital signal processing.)
That sounds like what CGAL calls a Circulator; c.f. http://doc.cgal.org/ latest/Circulator/classCirculator.html
Sounds to me like a ring_view - (ring_view?) which has been discussed for a long time.
Hi Robert,
On 21 Nov 2016 3:42 AM, "Robert Ramey"
On 11/20/16 8:01 AM, Steve M. Robbins wrote:
On Sunday, November 20, 2016 8:25:20 PM CST Jeremy Murphy wrote:
Hi,
just wondering what the mood in Boost.Iterator is for new features? At
work
we recently found use for an orbiting iterator, specifically a circular one, which effectively wraps at the start/end of a bounded range. (The domain is digital signal processing.)
That sounds like what CGAL calls a Circulator; c.f. http://doc.cgal.org/ latest/Circulator/classCirculator.html
Sounds to me like a ring_view - (ring_view?) which has been discussed for a long time.
I couldn't find anything on this with a cursory search, could you link to something? Thanks, cheers. Jeremy
On 11/20/16 2:00 PM, Jeremy Murphy wrote:
Hi Robert,
On 21 Nov 2016 3:42 AM, "Robert Ramey"
wrote: On 11/20/16 8:01 AM, Steve M. Robbins wrote:
On Sunday, November 20, 2016 8:25:20 PM CST Jeremy Murphy wrote:
Hi,
just wondering what the mood in Boost.Iterator is for new features? At
work
we recently found use for an orbiting iterator, specifically a circular one, which effectively wraps at the start/end of a bounded range. (The domain is digital signal processing.)
That sounds like what CGAL calls a Circulator; c.f. http://doc.cgal.org/ latest/Circulator/classCirculator.html
Sounds to me like a ring_view - (ring_view?) which has been discussed for a long time.
I couldn't find anything on this with a cursory search, could you link to something?
https://github.com/Quuxplusone/ring_view
Thanks, cheers. Jeremy
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
On 21 November 2016 at 11:35, Robert Ramey
On 11/20/16 2:00 PM, Jeremy Murphy wrote:
Hi Robert,
That sounds like what CGAL calls a Circulator; c.f. http://doc.cgal.org/ latest/Circulator/classCirculator.html
Sounds to me like a ring_view - (ring_view?) which has been discussed for
a long time.
I couldn't find anything on this with a cursory search, could you link to something?
Thanks. Yeah, so ring_span is a view, which I guess is more or less the Range equivalent. What I'm talking about is a generalization of the CGAL Circulator and Boost.Geometry ever_circling_iterator, and is in fact almost identical to the latter. So another way of saying this is that I just want to lift ever_circling_iterator out of Boost.Geometry for generic use. Cheers. Jeremy
-----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Jeremy Murphy Sent: 20 November 2016 22:00 To: boost Subject: Re: [boost] [iterator] Orbiting iterators
Hi Robert,
On 21 Nov 2016 3:42 AM, "Robert Ramey"
wrote: On 11/20/16 8:01 AM, Steve M. Robbins wrote:
On Sunday, November 20, 2016 8:25:20 PM CST Jeremy Murphy wrote:
Hi,
just wondering what the mood in Boost.Iterator is for new features? At
work
we recently found use for an orbiting iterator, specifically a circular one, which effectively wraps at the start/end of a bounded range. (The domain is digital signal processing.)
Must be useful to some people, so yes. (Needs tests, an example and docs of course to add to Boost).
That sounds like what CGAL calls a Circulator; c.f. http://doc.cgal.org/ latest/Circulator/classCirculator.html
Sounds to me like a ring_view - (ring_view?) which has been discussed for a long time.
We could bikeshed about the name? Orbiting iterator, ring_iterator, circulator, never-ending ... ;-) Paul --- Paul A. Bristow Prizet Farmhouse Kendal UK LA8 8AB +44 (0) 1539 561830
On 21 November 2016 at 21:29, Paul A. Bristow
On Sunday, November 20, 2016 8:25:20 PM CST Jeremy Murphy wrote:
Hi,
just wondering what the mood in Boost.Iterator is for new features?
At work
we recently found use for an orbiting iterator, specifically a circular one, which effectively wraps at the start/end of a bounded range. (The domain is digital signal processing.)
Must be useful to some people, so yes.
(Needs tests, an example and docs of course to add to Boost).
Thanks, Paul, always good to hear from you. Yes, the response so far convinces me that it is a useful and fairly elementary feature that has simply been overlooked.
Sounds to me like a ring_view - (ring_view?) which has been discussed for a long time.
We could bikeshed about the name?
Orbiting iterator, ring_iterator, circulator, never-ending ... ;-)
Yes, although I can tell you now that my proposal will be for a class
circular_iterator
On 11/26/16 20:50, Jeremy Murphy wrote: <snip>
So now the question remains: is there a maintainer of Boost.Iterator that, in principle, wants this? Who is/are the maintainer(s)? I found reference to a user jeffrey.hellrung, is that current?
Cheers.
Jeremy
By looking at the PR and commit histories, Boost.Iterator is not being maintained. I would like to request that the library be added to the CMT list. michael -- Michael Caisse Ciere Consulting ciere.com
participants (6)
-
David Stone
-
Jeremy Murphy
-
Michael Caisse
-
Paul A. Bristow
-
Robert Ramey
-
Steve M. Robbins