src/main/java/chlx/hashing/similarity/JaccardIndex.java
public static double indexMinHash(@NotNull int[] minhash1, @NotNull int[] minhash2) {
		if (minhash1.length != minhash2.length) {
			throw new IllegalArgumentException("Min hash lengths must be the same");
		}
		int simCount = 0;
		for (int i = 0; i < minhash1.length; i++) {
			if (minhash1[i] == minhash2[i]) {
				++simCount;
			}
		}
		return (double) simCount / minhash1.length;
	}
/**
	 * Calculate similarity between 2 min-hashes
	 */
Calculate similarity between 2 min-hashes
Calculate similarity between 2 min - hashes
public static double indexMinHash(@NotNull int[] minhash1, @NotNull int[] minhash2) {
		if (minhash1.length != minhash2.length) {
			throw new IllegalArgumentException("Min hash lengths must be the same");
		}
		int simCount = 0;
		for (int i = 0; i < minhash1.length; i++) {
			if (minhash1[i] == minhash2[i]) {
				++simCount;
			}
		}
		return (double) simCount / minhash1.length;
	}
public static double indexMinHash ( @ NotNull int [ ] minhash1 , @ NotNull int [ ] minhash2 ) { if ( minhash1 . length != minhash2 . length ) { throw new IllegalArgumentException ( "Min hash lengths must be the same" ) ; } int simCount = 0 ; for ( int i = 0 ; i < minhash1 . length ; i ++ ) { if ( minhash1 [ i ] == minhash2 [ i ] ) { ++ simCount ; } } return ( double ) simCount / minhash1 . length ; }
Calculate similarity between 2 min-hashes
Calculate similarity between 2 min - hashes