Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > Re: Submitted f...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 13 Topic 2118 of 2347
Post > Topic >>

Re: Submitted for your review: random sampling filters in gawk

by "steven.huwig@[EMAIL PROTECTED] " <steven.huwig@[EMAIL PROTECTED] > Jan 3, 2008 at 03:25 AM

On Jan 3, 4:28=A0am, "Luuk" <l...@[EMAIL PROTECTED]
> wrote:

> At 1st i was amazed by the randomness of this script,
> but i think i need an expert on randomness to tell why above is
happening.=
...
> (but still, thanks for sharing the scripts!)

srand() seeds the random number generator with the time in seconds, so
if your computer is fast enough that behavior of repeated selection
could happen. How does it work if you put a sleep 1 in your scripts?

On the other hand there looks to be an edge case with sample size n=3D1
as well. I would not be surprised at all. I can look into it a bit
more and post a fix if I find the bug in my implementation.

I think your script labels may be switched. I am seeing funny behavior
with the Vitter algorithm and sample size n=3D1.  The simpler one seems
to be fine.

Thanks!

-- Steve
 




 13 Posts in Topic:
Submitted for your review: random sampling filters in gawk
"steven.huwig@[EMAIL  2008-01-02 20:44:01 
Re: Submitted for your review: random sampling filters in gawk
"steven.huwig@[EMAIL  2008-01-02 21:00:41 
Re: Submitted for your review: random sampling filters in gawk
"Luuk" <luuk  2008-01-03 10:28:56 
Re: Submitted for your review: random sampling filters in gawk
Ed Morton <morton@[EMA  2008-01-04 15:45:48 
Re: Submitted for your review: random sampling filters in gawk
William James <w_a_x_m  2008-01-03 00:25:25 
Re: Submitted for your review: random sampling filters in gawk
Janis Papanagnou <Jani  2008-01-03 10:37:38 
Re: Submitted for your review: random sampling filters in gawk
"Anton Treuenfels&qu  2008-01-03 23:07:19 
Re: Submitted for your review: random sampling filters in gawk
"steven.huwig@[EMAIL  2008-01-03 03:25:09 
Re: Submitted for your review: random sampling filters in gawk
"Luuk" <luuk  2008-01-03 14:35:06 
Re: Submitted for your review: random sampling filters in gawk
mjc <mjcohen@[EMAIL PR  2008-01-04 12:12:40 
Re: Submitted for your review: random sampling filters in gawk
Ed Morton <morton@[EMA  2008-01-04 14:26:25 
Re: Submitted for your review: random sampling filters in gawk
gazelle@[EMAIL PROTECTED]  2008-01-04 21:54:46 
Re: Submitted for your review: random sampling filters in gawk
"steven.huwig@[EMAIL  2008-01-05 20:49:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 8:21:10 CDT 2008.