Boost logo

Boost :

From: Alex Mendes da Costa (alexmdac_at_[hidden])
Date: 2005-07-24 17:45:28


Hi folks:

I quite often have to write code to do the following:

Given N sequences, generate all the N-tuples s.t. the i'th element in
each tuple is drawn from the i'th sequence.

For example, if sequence S1 is { 1, 2, 3 } and sequence S2 is { 10, 20
}, I need to generate these tuples: (1, 10), (2, 10), (1, 20), (2,
20).

I think this problem could be solved elegantly with a iterator similar
to zip_iterator. I have some questions:

(1) Is there already a way to do this in boost?
(2) If not, would this be a worthwhile addition to the iterator library?
(3) If so, could I contribute code for this, or must the existing
library owners write it?
(4) If so, how would I go about getting my code added? Most of the
docs seem to be about submitting entire libraries, rather than
extensions to existing libraries.

Thanks,
Alex


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk