lib/dimsum.rb in dimsum-0.0.2 vs lib/dimsum.rb in dimsum-0.0.3
- old
+ new
@@ -25,10 +25,10 @@
out
end
def keep_line_in_index(input_line_number, sample_size, random_number_generator)
- if input_line_number <= sample_size
+ if input_line_number < sample_size
[true, input_line_number]
else
r = random_number_generator.rand(0 .. input_line_number)
keep = r < sample_size
[keep, r]