{
distances.setValue(i, ii, newdist[ii]);
distances.setValue(ii, i, newdist[ii]);
- System.out.println(String.format(
- "findClusterDistance(%d, %d) newdist to %d is %f", i, j, ii,
- newdist[ii]));
}
}
}
}
}
- System.out.println("findMinDistance found " + min + " at " + mini + ","
- + minj);
return min;
}
tmpi.dist = ((dist / 2) - ih);
tmpj.dist = ((dist / 2) - jh);
- System.out.println("findNewDistances set tmpi to " + tmpi.dist
- + ", tmpj to " + tmpj.dist);
}
}
{
double dist = distances.getValue(i, j);
- /*
- * add the members of cluster(j) to cluster(i)
- */
- clusters.get(i).or(clusters.get(j));
-
ri = findr(i, j);
rj = findr(j, i);
node.setElementAt(sn, i);
/*
- * mark cluster j as disposed of
+ * move the members of cluster(j) to cluster(i)
+ * and mark cluster j as out of the game
*/
+ clusters.get(i).or(clusters.get(j));
+ clusters.get(j).clear();
done.set(j);
- clusters.setElementAt(null, j);
}
protected abstract void findNewDistances(SequenceNode tmpi, SequenceNode tmpj,