Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^4: Unique Combos with Math::Combinatorics

by ketema (Scribe)
on Mar 02, 2008 at 03:41 UTC ( [id://671461]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Unique Combos with Math::Combinatorics
in thread Unique Combos with Math::Combinatorics

Simply because although I understood the idea of what you were doing, I did not understand how to use the code. I typed it out so i could visualize what was going on,each assignment etc... After reviewing your code and comparing I do see now how it works, but I never would see that on my own to start. Thanks for the help.
  • Comment on Re^4: Unique Combos with Math::Combinatorics

Replies are listed 'Best First'.
Re^5: Unique Combos with Math::Combinatorics
by ikegami (Patriarch) on Mar 02, 2008 at 06:21 UTC

    I did not understand how to use the code.

    Change
    for each combination @c:
    to
    while ( my @c = $comboObj->next_combination){

    and change
    # emit combination here
    to
    print join(', ', @c) . "\n";

    After reviewing your code and comparing I do see now how it works,

    It was neither my code nor my post.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://671461]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-25 11:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found