
Hi folks, A cross_iterator is to a zip_iterator as a cross_product is to a dot_product. For example, given two sequences { a, b }, { 1, 2 }, the sequence of tuples generated by a cross_iterator would be { ( a, 1 ), ( b, 1 ), ( a, 2 ), ( b, 2 ) }. I've put my implementation of cross_iterator in the sandbox (cross_iterator.zip @ http://boost-sandbox.sourceforge.net/vault/). There's no documentation yet, but I've included a sample file that demonstrates how to use the new iterator. Please take a look and let me know what you think. Alex

"Alex Mendes da Costa" wrote:
A cross_iterator is to a zip_iterator as a cross_product is to a dot_product. For example, given two sequences { a, b }, { 1, 2 }, the sequence of tuples generated by a cross_iterator would be { ( a, 1 ), ( b, 1 ), ( a, 2 ), ( b, 2 ) }.
I've put my implementation of cross_iterator in the sandbox (cross_iterator.zip @ http://boost-sandbox.sourceforge.net/vault/). There's no documentation yet, but I've included a sample file that demonstrates how to use the new iterator.
It sounds as something similar to "list comprehention" feature of several other languages. Will it be possible to specify filter(s) to select only those tuples I want? /Pavel
participants (2)
-
Alex Mendes da Costa
-
Pavel Vozenilek