God I LOVE you guys! lol
That's the exact term I needed - cartesian product. Simple google
search got me exactly what I needed.
AHHH. I could hug you all! :D
Kirk
On Wed, Apr 1, 2009 at 4:12 PM, Xavier Shay wrote:
>
> I solve exactly the same problem you're trying to with the below method
>
I solve exactly the same problem you're trying to with the below method
(cartesian product)
There's a few implementations around the net, I'd be surprised if there
isn't one for PHP.
Julian Doherty wrote:
> So you basically want a cartesian product of an arbitrary list of lists?
>
> The Ruby
Hi,
Just a quick reminder that the next Sydney roro meeting is on
Wednesday 8th April at:
Trinity Bar - 505 Crown St, Surry Hills, NSW 2010
http://tinyurl.com/6emfna (upstairs)
Currently we have three people stepping up to present:
Lightning Talks:
* Myles Byrne - "Git Ninja Moves wi
So you basically want a cartesian product of an arbitrary list of lists?
The Ruby facets gem does that:
http://facets.rubyforge.org/git?p=facets.git;a=blob;f=lib/core/facets/array/product.rb;h=f890ddc0ddd7e7f5076f207d0cc126b7bf34ceea;hb=HEAD
Heres what the Ruby code looks like (works for an arbitr
I think Mark's answer was correct given the example you initially gave. However, if you want to iterate over groups of dissimilar sets without hard coding the looping to a fixed 'n' then I think you're after something like a multi-dimension iterator.I wrote one for Java here: http://www.alexpooley
without knowing PHP or your data structure ... can you build an array
of arrays, option group x option? Recursive iteration through the
arrays can work then
Torm3nt wrote:
Yeah variable number of option groups, currently working with PHP.
On Wed, Apr 1, 2009 at 1:07 AM, Mark Ratjens wro
Yeah variable number of option groups, currently working with PHP.
On Wed, Apr 1, 2009 at 1:07 AM, Mark Ratjens wrote:
> OK ... so how many option groups? are they variable? what language are you
> trying to express this in?
>
> Torm3nt wrote:
>
> Unfortunately it doesn't quite work that straig
OK ... so how many option groups? are they variable? what language are
you trying to express this in?
Torm3nt wrote:
Unfortunately it doesn't quite work that straight forward when the
number of the different option groups = n =P
On Wed, Apr 1, 2009 at 12:52 AM, Mark Ratjens
wrote:
Unfortunately it doesn't quite work that straight forward when the
number of the different option groups = n =P
On Wed, Apr 1, 2009 at 12:52 AM, Mark Ratjens
wrote:
>
> Hmm ... what idioms are we allowed then? :-)
>
> Iterate over the sizes
> within each size
> iterate over the colours
Hmm ... what idioms are we allowed then? :-)
Iterate over the sizes
within each size
iterate over the colours
make a combination and stow it somewhere
Does that make sense?
Either that or get some sleep :-)
Torm3nt wrote:
> This may seem rather simple to some, but being la
This may seem rather simple to some, but being late at night it's
driving me up the wall..
The context behind this is I'm trying to create all unique product
options for a product.
Consider:
We have two product option groups, size and colour.
Size contains: S, M, L, XL
Colour contains: red, bl
The problem was that I had Rack 0.9.1 as a dependent gem in my
environment.rb which conflicted with the version of Rack that is
bundled with Rails 2.3.2. I had added rack 0.9.1 as a dependency
because Rspec 1.2.2 needs it. I moved the Rack dependency to test.rb
and now everything works.
--~--~---
12 matches
Mail list logo