HyperLogLog: make API use the P prefix in honor of Philippe Flajolet.

This commit is contained in:
antirez
2014-03-31 19:16:47 +02:00
parent 1e90c0066c
commit 2ee2bec2d6
5 changed files with 19 additions and 19 deletions

View File

@ -18,9 +18,9 @@ while true do
elements << ele
i += 1
}
r.hlladd('hll',*elements)
r.padd('hll',*elements)
}
approx = r.hllcount('hll')
approx = r.pcount('hll')
abs_err = (approx-i).abs
rel_err = 100.to_f*abs_err/i
puts "#{i} vs #{approx}: #{rel_err}%"