Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Permutations in reverse order (easy)

by wanna_code_perl (Pilgrim)
on Mar 02, 2013 at 09:19 UTC ( #1021402=note: print w/ replies, xml ) Need Help??


in reply to Re: Permutations in reverse order (easy)
in thread Permutations in reverse order

Thank you, tye. You know, I had tried this early on, but discarded the idea at the time because I was still getting inconsistent results with Algorithm::Permute. Algorithm::Permute explicitly doesn't guarantee any order to its results, but it was ordered when the items where initially in lex order (which mine were not). I later found the fine print in the docs, but I didn't think to revisit the $max - $_ transformation. Switching to Algorithm::Loops, combined with this $max - $_ suggestion, was the solution.


Comment on Re^2: Permutations in reverse order (easy)
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2015-07-03 17:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (54 votes), past polls