private ArrayList < ArrayDBIDs > buildOneDimIndexes ( Relation < ? extends NumberVector > relation ) { final int dim = RelationUtil . dimensionality ( relation ) ; ArrayList < ArrayDBIDs > subspaceIndex = new ArrayList <> ( dim + 1 ) ; SortDBIDsBySingleDimension comp = new VectorUtil . SortDBIDsBySingleDimension ( relation ) ; for ( int i = 0 ; i < dim ; i ++ ) { ArrayModifiableDBIDs amDBIDs = DBIDUtil . newArray ( relation . getDBIDs ( ) ) ; comp . setDimension ( i ) ; amDBIDs . sort ( comp ) ; subspaceIndex . add ( amDBIDs ) ; } return subspaceIndex ; }
Calculates index structures for every attribute i . e . sorts a ModifiableArray of every DBID in the database for every dimension and stores them in a list