private HashMap < String , DBIDs > singleAssignment ( Relation < ? > data ) { HashMap < String , DBIDs > labelMap = new HashMap <> ( ) ; for ( DBIDIter iditer = data . iterDBIDs ( ) ; iditer . valid ( ) ; iditer . advance ( ) ) { final Object val = data . get ( iditer ) ; String label = ( val != null ) ? val . toString ( ) : null ; assign ( labelMap , label , iditer ) ; } return labelMap ; }
Assigns the objects of the database to single clusters according to their labels .