private int updateSizes ( DBIDs ids , WritableDataStore < ModifiableDBIDs > labels , WritableIntegerDataStore newSizes ) { // to count the unclustered all over int countUnmerged = 0 ; for ( DBIDIter iter = ids . iter ( ) ; iter . valid ( ) ; iter . advance ( ) ) { // checking the point's new cluster size after the clustering step int newClusterSize = labels . get ( iter ) . size ( ) ; newSizes . putInt ( iter , newClusterSize ) ; // the point is alone in the cluster --> not merged with other points if ( newClusterSize == 1 ) { countUnmerged ++ ; } } return countUnmerged ; }
This method updates each object s cluster size after the clustering step .