private int buildCluster(List<VectorResult> cluster, double simThreshold,
		double sigThreshold)
		throws LSHException {
		TreeMap<Long, VectorResult> workList = new TreeMap<Long, VectorResult>();
		Long firstKey = baseIds.pollFirst();
		workList.put(firstKey, null);
		int hitCount = 0;
		while (!workList.isEmpty()) {
			VectorResult vectorInfo = queryVectorForCluster(workList, simThreshold);	// Retrieve vector, add close vectors
			if (sigThreshold < vectorFactory.getSelfSignificance(vectorInfo.vec)) {	// If self-sig exceeds threshold
				cluster.add(vectorInfo);											//    add it to the cluster
				hitCount += vectorInfo.hitcount;
			}
		}
		return hitCount;
	}
Starting with the first vector in -vectorMap- build the cluster of vectors that are within
a given -threshold- of each other. The cluster is the "connected" component containing the
first vector, where two vectors are "connected" if they are similar to each other within
the threshold. 
@param cluster will hold the list of vectors in the cluster
@param simThreshold is the similarity threshold defining "near" or "connected"
@param sigThreshold is the minimum significance for contributing score 
@return the total number of functions associated with any vector in the cluster
@throws LSHException is something goes wrong during database queries
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/ExecutableComparison.java