Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: algorithm for 'best subsets'

by Roy Johnson (Monsignor)
on Mar 03, 2005 at 16:27 UTC ( [id://436275]=note: print w/replies, xml ) Need Help??


in reply to Re: algorithm for 'best subsets'
in thread algorithm for 'best subsets'

Wow. It's certainly interesting code (that's not a backhanded compliment).

However, I think you figured combinations that weren't what the OP was looking for. You tell us what the intersection is of each tuple of keys: for example, b and c have two and five in common. I think what the OP wanted was the intersection of a tuple of values: two and five appear together in b, c, e, g, and h.

If I can figure out what's what in your code, I will see if it can be made to do that. Also, you can use arrays instead of hashes for revipos and revkpos; then you can use @revipos everywhere you use sort keys %items (because that's all it is).


Caution: Contents may have been coded under pressure.

Log In?
Username:
Password:

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

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

    No recent polls found