question: protected void convertNeighbors ( DBIDRange ids , DBIDRef ix , boolean square , KNNList neighbours , DoubleArray dist , IntegerArray ind ) { for ( DoubleDBIDListIter iter = neighbours . iter ( ) ; iter . valid ( ) ; iter . advance ( ) ) { if ( DBIDUtil . equal ( iter , ix ) ) { continue ; } double d = iter . doubleValue ( ) ; dist . add ( square ? ( d * d ) : d ) ; ind . add ( ids . getOffset ( iter ) ) ; } }
target:  Load a neighbor query result into a double and and integer array, also removing the query point. This is necessary, because we have to modify the distances. TODO: sort by index, not distance