I made the change to RandomSeedGenerator. I went with a different
algorithm to pick k elements from the input at random, since the
number of input elements is not known. This works -- right?

for each element in input
   if output size less than k
      add element to output
   else
     with probability 1/(output size + 1)
        pick a random output element to remove
        add element to output

write all elements in output


Also some style notes...

- We're using SLF4J for logging
- Copyright headers in all files, above the package statement
- 'transient' only has meaning for instance fields, and only matters
when using Java serialization anyhow
- I think utility classes should be final and have a private constructor
- Shall we avoid writing empty javadoc? I see this a lot
/**
 *
 *
 **/

Reply via email to