private ArrayDBIDs computeM_current ( DBIDs m , DBIDs m_best , DBIDs m_bad , Random random ) { ArrayModifiableDBIDs m_list = DBIDUtil . newArray ( m ) ; m_list . removeDBIDs ( m_best ) ; DBIDArrayMIter it = m_list . iter ( ) ; ArrayModifiableDBIDs m_current = DBIDUtil . newArray ( ) ; for ( DBIDIter iter = m_best . iter ( ) ; iter . valid ( ) ; iter . advance ( ) ) { if ( m_bad . contains ( iter ) ) { int currentSize = m_current . size ( ) ; while ( m_current . size ( ) == currentSize ) { m_current . add ( it . seek ( random . nextInt ( m_list . size ( ) ) ) ) ; it . remove ( ) ; } } else { m_current . add ( iter ) ; } } return m_current ; }
Computes the set of medoids in current iteration .