Skip to content

Commit

Permalink
Mention bias in test_integer_hash.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjnixon committed Sep 2, 2013
1 parent 9119426 commit f16e215
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/test_index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def test_integer_hash
hashes.first.each { |h| assert h.class == Fixnum } # Continuous LSH
# Testing the first hash element
first_hash_value = ( (index.storage.projections.first * v1.transpose)[0,0]/ 10).floor
# Could be in either bucket due to bias.
assert (hashes.first.first == first_hash_value or hashes.first.first == first_hash_value + 1)
end

Expand Down

0 comments on commit f16e215

Please sign in to comment.