Skip to content

Commit 160ab9d

Browse files
committed
add BloomFilter and MurmurHash2
1 parent 745b2ed commit 160ab9d

File tree

11 files changed

+691
-30
lines changed

11 files changed

+691
-30
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ tasks.withType(JavaCompile) { options.encoding = "UTF-8" }
2626

2727
group = 'com.github.myibu'
2828
archivesBaseName = "algorithm-java"
29-
version = "0.0.1a"
29+
version = "0.0.1b"
3030

3131
repositories {
3232
mavenCentral()

docs/BloomFilter.pdf

58.5 KB
Binary file not shown.

readme.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,20 @@ Reference to: [siphash.pdf](./docs/siphash.pdf)
1111
### SHA256
1212
Reference to: [SHA256.pdf](./docs/SHA256.pdf)
1313

14+
### MurmurHash2
15+
Reference to: [MurmurHash2.c](https://github.com/RedisBloom/RedisBloom/blob/master/contrib/MurmurHash2.c)
16+
17+
### BloomFilter
18+
Reference to: [BloomFilter.pdf](./docs/BloomFilter.pdf)
19+
20+
### Bits
21+
1422
## Installation
1523
```bash
1624
<dependency>
1725
<groupId>com.github.myibu</groupId>
1826
<artifactId>algorithm-java</artifactId>
19-
<version>0.0.1a</version>
27+
<version>0.0.1b</version>
2028
</dependency>
2129
```
2230

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.github.myibu.algorithm.data;
2+
/**
3+
* Bit enum
4+
* @author myibu
5+
* Created on 2021/9/14
6+
*/
7+
public enum Bit {
8+
/**
9+
* 0
10+
*/
11+
ZERO(0),
12+
/**
13+
* 1
14+
*/
15+
ONE(1);
16+
final int value;
17+
18+
Bit(int value) {
19+
this.value = value;
20+
}
21+
22+
public int value() {
23+
return this.value;
24+
}
25+
}

0 commit comments

Comments
 (0)