Commit Graph

25 Commits

Author SHA1 Message Date
Phyks 49f4fdb55b s/UInt32/Int32 2014-10-27 22:47:56 +01:00
Phyks 28165113da Include https://github.com/jasondavies/bloomfilter.js/pull/11 2014-10-27 22:21:25 +01:00
Phyks b73b5692d3 Use capacity / error_rate syntax 2014-10-27 22:14:45 +01:00
Jason Davies 503ae1afdb Round *m* up to nearest multiple of 32.
Fixes #9.
2014-02-28 15:39:48 +00:00
Jason Davies 2529639ace Merge branch 'items_estimate' of https://github.com/eugeneware/bloomfilter.js 2013-06-13 09:13:02 +01:00
Eugene Ware c9bbcaba98 added support for estimating the number of items in the filter 2013-06-13 14:53:38 +10:00
Jason Davies 318ebca0a8 Construct bloom filter from existing buckets.
Fixes #2.
2013-04-30 12:04:41 +01:00
Jason Davies f83a02d145 Simplify. 2012-09-06 09:19:22 +01:00
dmcgrath c136a0d33a Update bloomfilter.js
Buffer size is 8 times larger than required.

Reasoning:
   'var n = Math.ceil(m / 32);' <- n is size in double words
   ArrayBuffer takes size in bytes. Convert double word size to byte size = multiplying by 4.

Current code converted double word back to bits.
2012-09-05 22:27:34 -07:00
Jason Davies 762d969a94 Merge remote-tracking branch 'gleenn/master' into release 2012-07-09 10:56:26 +01:00
Glenn 5964e27e05 Adding support for number types 2012-07-08 22:17:52 -07:00
Jason Davies dac2d326a0 Fix another couple of bugs with set/test. 2011-12-08 21:31:02 +00:00
Jason Davies 19060d93fe More mixing added to FNV-1a.
Lack of sufficient mixing was causing "wtf" to hash poorly in the second
hash function, and only map to one location instead of ten.
2011-12-08 18:43:12 +00:00
Jason Davies 98745832e8 Fix initial buffer size calculation. 2011-12-07 23:10:36 +00:00
Jason Davies 66cd9f577a Fix a serious bug with bucket indexing. 2011-12-07 21:57:03 +00:00
Jason Davies ceb93e3a88 Better UTF-8 hashing, and more tests. 2011-12-07 11:42:48 +00:00
Jason Davies 6f6d58e521 Check for typed arrays support on load. 2011-12-07 00:44:42 +00:00
Jason Davies 450423ebf6 Improvements to typed arrays. 2011-12-07 00:41:09 +00:00
Jason Davies 445e617a78 Use typed arrays. 2011-12-06 23:49:46 +00:00
Jason Davies fb9ec01fdb Rearrange things a bit. 2011-12-06 23:37:05 +00:00
Jason Davies e0a924bda9 Use shifts instead of multiply to avoid fp issues. 2011-09-05 14:14:32 +01:00
Jason Davies 62d9feda09 Improve portability. 2011-09-04 19:27:16 +01:00
Jason Davies f68498701f Minor optimisation. 2011-09-04 19:19:12 +01:00
Jason Davies d471e98419 Fix a hashing bug.
JavaScript doesn't support 64-bit integers, unfortunately, so instead
I'm generating a single 32-bit hash and then taking the next iteration
as the second hash.
2011-09-04 14:07:43 +01:00
Jason Davies fd8e588ac8 Bloom filter in JavaScript using FNV hash. 2011-09-04 10:25:02 +01:00