On Oct 5, 2015, at 0545, andrea crotti <[email protected]> wrote:
> Any idea how to make this faster?
> Other advices on the code are welcome as well..
Why not generate the the possible left-hand teams and then cartesian product
with the leftover players? E.g., if you want to match 2 on 2 and have players
A B C D E:
(A,B) cartesian product with (combinations #{C D E})
(B,C) cartesian product with (combinations #{A D E})
and so on with
(C,D)
(D,E)
I think this will generate each possible match exactly twice- mirror images of
each other, but proof is left as an exercise for the reader.
I would imagine there is a better algorithm for this than mine.
Cheers,
Frank Siler
Siler Industrial Analytics
314.799.9405
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.