Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Weighted random numbers generator

by Anonymous Monk
on Mar 13, 2003 at 22:27 UTC ( [id://242868]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    [0,50/96) => 1,
    [50/96,150/96) => 2,
    on and on
    [some fraction,5] => 3
    
  2. or download this
    [0,3/3 * 3)  => 1
    [3/3 * 3, 3/3*3 + 2/3*3 ) => 2
    ...
    
    [0,1] => 1,
    [1,3] => 2
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2024-03-29 01:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found