Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Randomly biased, random numbers.

by RichardK (Vicar)
on Dec 06, 2013 at 11:32 UTC ( #1065962=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Randomly biased, random numbers.
in thread Randomly biased, random numbers.

How about using a inverse log distance distribution? Maybe something like this :-

my $d = max_distance * ( 1 - log( rand(1000) ) / log( 1000 ) );


Comment on Re^3: Randomly biased, random numbers.
Download Code
Replies are listed 'Best First'.
Re^4: Randomly biased, random numbers.
by BrowserUk (Pope) on Dec 06, 2013 at 18:54 UTC

    See Re^2: Randomly biased, random numbers. for a similar type of mapping function and why its not suitable.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (12)
As of 2015-07-08 07:23 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 (96 votes), past polls