Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Evolving a faster filter? (optimal solution?)

by LanX (Canon)
on Jan 04, 2013 at 21:22 UTC ( #1011721=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @order = sort {
        $Costs[$a]+$Trims[$a]*$Costs[$b] <=> $Costs[$b]+$Trims[$b]*$Costs[
    +$a]
    } 0..$#Costs;
    
  2. or download this
    my @order = sort {
        $Costs[$a]/(1-$Trims[$a]) <=> $Costs[$b]/(1-$Trims[$b])
    } 0..$#Costs;
    
  3. or download this
    my @order = sort {
        $weight[$a] <=> $weight[$b]
    } 0..$#Costs;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2014-12-21 01:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (100 votes), past polls