Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Think about Loose Coupling
 
PerlMonks  

Re: Weighted random numbers generator

by blokhead (Monsignor)
on Mar 13, 2003 at 17:05 UTC ( #242751=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub choose_weighted {
        my $weights  = shift;
    ...
    
        return $i;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (15)
As of 2014-04-18 18:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (471 votes), past polls