Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Empty Elements

by MarkM (Curate)
on Jun 09, 2003 at 04:47 UTC ( #264239=note: print w/replies, xml ) Need Help??

in reply to Empty Elements

I believe you intended your second last line to read:

$DECK[$_-1] = $i;

Note, however, that your algorithm wastes valuable entropy, and is inefficient. Wasted entropy can reduce the effective period of a rand() function. The inner loop could also, in theory, loop indefinately (although for the expected scenario, it would loop 100 times or less).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://264239]
[choroba]: doesn't sound much useful, which means I'll probably remember it
[karlgoethebier]: "that blue pain" == Salzglasur as far as i remember
[karlgoethebier]: Paint!
[shmem]: karlgoethebier the blue pain comes after all bembels are empty
[karlgoethebier]: Confusing "Bembel" with "Membel" might result in a slap in the face in Hesse...
[karlgoethebier]: shmem: Yes. Greetings from Dr. Freud
[Discipulus]: blue pain is a synōnymía

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2017-05-24 09:00 GMT
Find Nodes?
    Voting Booth?