//System.out.println("Reassignment table: "+IntArrays.toString(reassign));
// assignment
IDiscretization assignment = this.clusterMethodLeaves.getClusterAssignment();
IDataSequence centers = this.clusterMethodLeaves.getClusterCenters();
IIntArray micro2macroLeaf = cluster.discretize(subset, assignment);
// update global assignment
for (int i=0; i<leaf.indexes.size(); i++)
{
int globalIndex = leaf.indexes.get(i);
int newClusterIndex = reassign[micro2macroLeaf.get(i)];
micro2macro.set(globalIndex, newClusterIndex);
}
// create new leaves
IIntArray[] newLeaveIndexes = new IIntArray[nPieces];
for (int i=0; i<nPieces; i++)