Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/java/info/debatty/java/lsh/LSHMinHash.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class LSHMinHash extends LSH {
*/
public LSHMinHash(final int s, final int b, final int n) {
super(s, b);
int signature_size = computeSignatureSize(s, n);
int signature_size = computeSignatureSize(s, b);
this.mh = new MinHash(signature_size, n);
}

Expand All @@ -66,7 +66,7 @@ public LSHMinHash(final int s, final int b, final int n) {
*/
public LSHMinHash(final int s, final int b, final int n, final long seed) {
super(s, b);
int signature_size = computeSignatureSize(s, n);
int signature_size = computeSignatureSize(s, b);
this.mh = new MinHash(signature_size, n, seed);
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter should be changed to b as well.

Expand All @@ -92,7 +92,7 @@ public LSHMinHash(final int s, final int b, final int n, final long seed) {
private int computeSignatureSize(final int s, final int n) {

int r = (int) Math.ceil(Math.log(1.0 / s) / Math.log(THRESHOLD)) + 1;
return r * s;
return r * b;
}

/**
Expand Down