private static float computeSimilarity(int instanceA, int instanceB,
			int[][] permSimilarities) {
		int same = 0;
		for (int i = 0; i < permSimilarities.length; ++i) {
			if (permSimilarities[i][instanceA] == permSimilarities[i][instanceB]) {
				same++;
			}
		}
		return same * 1.0f / permSimilarities.length * 1.0f;
	}