private boolean split(int leafIndex)
{
int nClustersBeforeSplitting = leavesNew.size();
// cluster leaf
Leaf leaf = leavesNew.get(leafIndex);
DataSequenceSubset subset = new DataSequenceSubset(data, leaf.indexes);
this.clusterMethodLeaves.setInput(subset);
this.clusterMethodLeaves.perform();
int nPieces = this.clusterMethodLeaves.getNumberOfClusters();
if (nPieces == 1)
return false; // no splitting could be done, return unsuccessful.