question: private ArrayList < PROCLUSCluster > assignPoints ( ArrayDBIDs m_current , long [ ] [ ] dimensions , Relation < V > database ) { ModifiableDBIDs [ ] clusterIDs = new ModifiableDBIDs [ dimensions . length ] ; for ( int i = 0 ; i < m_current . size ( ) ; i ++ ) { clusterIDs [ i ] = DBIDUtil . newHashSet ( ) ; } DBIDArrayIter m_i = m_current . iter ( ) ; for ( DBIDIter it = database . iterDBIDs ( ) ; it . valid ( ) ; it . advance ( ) ) { V p = database . get ( it ) ; double minDist = Double . NaN ; int best = - 1 , i = 0 ; for ( m_i . seek ( 0 ) ; m_i . valid ( ) ; m_i . advance ( ) , i ++ ) { V m = database . get ( m_i ) ; double currentDist = manhattanSegmentalDistance ( p , m , dimensions [ i ] ) ; if ( ! ( minDist <= currentDist ) ) { minDist = currentDist ; best = i ; } } assert best >= 0 ; ModifiableDBIDs ids = clusterIDs [ best ] ; ids . add ( it ) ; } ArrayList < PROCLUSCluster > clusters = new ArrayList < > ( m_current . size ( ) ) ; for ( int i = 0 ; i < dimensions . length ; i ++ ) { ModifiableDBIDs objectIDs = clusterIDs [ i ] ; if ( ! objectIDs . isEmpty ( ) ) { long [ ] clusterDimensions = dimensions [ i ] ; double [ ] centroid = Centroid . make ( database , objectIDs ) . getArrayRef ( ) ; clusters . add ( new PROCLUSCluster ( objectIDs , clusterDimensions , centroid ) ) ; } else { clusters . add ( null ) ; } } if ( LOG . isDebugging ( ) ) { StringBuilder msg = new StringBuilder ( ) ; msg . append ( '\n' ) ; msg . append ( "clusters " ) . append ( clusters ) . append ( '\n' ) ; LOG . debugFine ( msg . toString ( ) ) ; } return clusters ; }
target:  Assigns the objects to the clusters.