Map<Integer,List<WeightedPropertyVectorWritable>> clusterIdToPoints = getClusterIdToPoints();
List<WeightedPropertyVectorWritable> points = clusterIdToPoints.get(clusterWritable.getValue().getId());
if (points != null) {
writer.write("\tWeight : [props - optional]: Point:\n\t");
for (Iterator<WeightedPropertyVectorWritable> iterator = points.iterator(); iterator.hasNext();) {
WeightedPropertyVectorWritable point = iterator.next();
writer.write(String.valueOf(point.getWeight()));
Map<Text,Text> map = point.getProperties();
// map can be null since empty maps when written are returned as null
writer.write(" : [");
if (map != null) {
for (Map.Entry<Text,Text> entry : map.entrySet()) {
writer.write(entry.getKey().toString());
writer.write("=");
writer.write(entry.getValue().toString());
}
}
writer.write("]");
writer.write(": ");
writer.write(AbstractCluster.formatVector(point.getVector(), dictionary));
if (iterator.hasNext()) {
writer.write("\n\t");
}
}
writer.write('\n');