Boost logo

Boost Users :

Subject: Re: [Boost-users] Iterators for the cartesian product
From: eddyaod_at_[hidden]
Date: 2011-06-13 11:49:34


On 13 June 2011 12:37, kelvSYC <kelvsyc_at_[hidden]> wrote:

> So that the wheel doesn't have to be reinvented if it's already out there,
> is there something in boost that will take a bunch of sequences (lists, say)
> and return a sequence containing the cartesian product all of them, either
> as a tuple or after applying a function to them?
>
> For example, is there something in boost that will, given a bunch of lists
> of integers, return a list of integers formed by multiplying together one
> member from each list?
>

It seems that the folks at Organic Vectory have solved a problem along these
lines:
http://www.organicvectory.com/index.php?option=com_content&view=article&id=75:boostmplcartesianproduct&catid=42:boost&Itemid=78

They make use of the Boost MPL, which would provide you with tools for
implementing your own solution if you don't find an implementation you like.

> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net