@Override
	public long calcUniqueHash() {
		int reg1 = 0x12CF93AB;
		int reg2 = 0xEE39B2D6;
		for (int i = 0; i < hash.length; ++i) {
			HashEntry entry = hash[i];
			int curtf = entry.getTF();
			int curhash = entry.getHash();
			int oldreg1 = reg1;
			reg1 = SimpleCRC32.hashOneByte(reg1, curtf);
			reg1 = SimpleCRC32.hashOneByte(reg1, curhash);
			reg1 = SimpleCRC32.hashOneByte(reg1, (reg2 >>> 24));
			reg2 = SimpleCRC32.hashOneByte(reg2, (oldreg1 >>> 24));
			reg2 = SimpleCRC32.hashOneByte(reg2, (curhash >>> 8));
			reg2 = SimpleCRC32.hashOneByte(reg2, (curhash >>> 16));
			reg2 = SimpleCRC32.hashOneByte(reg2, (curhash >>> 24));
		}
		long res = reg1;
		long res2 = reg2;
		res2 <<= 32;// Make sure we don't sign extend, casting from int to long
		res2 >>>= 32;
		res <<= 32;
		res |= res2;
		return res;
	}
Assuming -feature- is sorted and -hash- is empty, count the features and populate -hash- and -tf-
For every unique feature, look up its idf via -idflookup-
@param feature is the list of sorted hash features
@param wfactory is the WeightFactory used to decide feature weights
@param idflookup is the IDFLookup used to decide relative frequency of individual features
Ghidra/Framework/Generic/src/main/java/generic/lsh/vector/LSHCosineVector.java