Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Randomize lines with limited memory

by Anonymous Monk
on Nov 03, 2003 at 21:57 UTC ( #304257=note: print w/replies, xml ) Need Help??

in reply to Randomize lines with limited memory

Buckets. Buckets buckets buckets.

Open in file,
open (n) out files,
read line by line,
output to out file rand(n)
close all files
append all out files together at end

for better randomness, greater (n) is good, and operation can be repeated as many times as desired. Do it at least twice to avoid order bias.

love the buckets

  • Comment on Re: Randomize lines with limited memory

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://304257]
[Your Mother]: Roger, will co.
[Your Mother]: The good news is, they think they are influencing people but Americans at least are irretrievably biased. All that can be accomplished is a little spike in domestic violence. :P

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (11)
As of 2018-03-19 13:25 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (240 votes). Check out past polls.