Boost C++ Libraries: Ticket #9684: Add a multidimensional counting_range https://svn.boost.org/trac10/ticket/9684 <p> I think a multidimensional (floating point) counting_range with configurable step size would be useful, at least I have found a need for that many times. Here is a suggestion, could something like this eventually be included in boost? What modifications should I make (after switching to boost::bind)? The iterated values are evenly spaced from each other and the boundaries. </p> <p> Example usage: </p> <p> boost::array&lt;double, 2&gt; start{-4, 3}, end{4, 11}; </p> <p> const size_t samples_per_dim = 2; </p> <p> for (const auto&amp; i: volume_iterator(start, end, samples_per_dim)) { </p> <blockquote> <p> print(i); </p> </blockquote> <p> } </p> <p> Output: </p> <p> -2 5 </p> <p> 2 5 </p> <p> -2 9 </p> <p> 2 9 </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9684 Trac 1.4.3 ilja.j.honkonen@… Wed, 19 Feb 2014 16:54:56 GMT attachment set https://svn.boost.org/trac10/ticket/9684 https://svn.boost.org/trac10/ticket/9684 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">testi.cpp</span> </li> </ul> Ticket Neil Groves Wed, 26 Feb 2014 22:08:19 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9684#comment:1 https://svn.boost.org/trac10/ticket/9684#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> irange with step size already exists. The floating-point idea has been explicitly rejected due to difficulties providing loop variant / invariant guarantees. </p> Ticket anonymous Thu, 27 Feb 2014 03:49:49 GMT <link>https://svn.boost.org/trac10/ticket/9684#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9684#comment:2</guid> <description> <p> In case someone finds this useful I've put it into a hpp file here: ttps://github.com/nasailja/pamhd/blob/master/source/volume_range.hpp </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 27 Feb 2014 03:50:57 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9684#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9684#comment:3</guid> <description> <p> Couldn't get past the spam filter, the correct address starts with https... </p> </description> <category>Ticket</category> </item> </channel> </rss>