private void reinsertExpanded ( SpatialPrimitiveDistanceFunction < V > distFunction , DeLiCluTree index , IndexTreePath < DeLiCluEntry > path , DataStore < KNNList > knns ) { int l = 0 ; // Count the number of components. for ( IndexTreePath < DeLiCluEntry > it = path ; it != null ; it = it . getParentPath ( ) ) { l ++ ; } ArrayList < IndexTreePath < DeLiCluEntry > > p = new ArrayList <> ( l - 1 ) ; // All except the last (= root). IndexTreePath < DeLiCluEntry > it = path ; for ( ; it . getParentPath ( ) != null ; it = it . getParentPath ( ) ) { p . add ( it ) ; } assert ( p . size ( ) == l - 1 ) ; DeLiCluEntry rootEntry = it . getEntry ( ) ; reinsertExpanded ( distFunction , index , p , l - 2 , rootEntry , knns ) ; }
Reinserts the objects of the already expanded nodes .