private void writeBothList(ArrayList<HashEntry> both, StringBuilder buf) {
		for (int i = 0; i < both.size(); i += 2) {
			HashEntry entry1 = both.get(i);
			HashEntry entry2 = both.get(i + 1);
			buf.append(Integer.toHexString(entry1.getHash()));
			buf.append(" (").append(entry1.getTF()).append(',').append(entry2.getTF()).append(
				") (");
			buf.append(entry1.getCoeff()).append(',').append(entry2.getCoeff()).append(")\n");
		}
	}
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