Collection<Integer> set = new HashSet<Integer>();
Vector v[] = new Vector[3];
for (ClusterWritable clusterWritable :
new SequenceFileValueIterable<ClusterWritable>(
new Path(output, "part-eigenSeed"), true, conf)) {
Cluster cluster = clusterWritable.getValue();
int id = cluster.getId();
assertTrue(set.add(id)); // validate unique id's
v[id] = cluster.getCenter();
clusterCount++;
}
assertEquals(3, clusterCount); // validate sample count
// validate pair-wise orthogonality
assertEquals(0, v[0].dot(v[1]), 1E-10);