protected IndexTreePath < E > findPathToObject ( IndexTreePath < E > subtree , SpatialComparable mbr , DBIDRef id ) { N node = getNode ( subtree . getEntry ( ) ) ; if ( node . isLeaf ( ) ) { for ( int i = 0 ; i < node . getNumEntries ( ) ; i ++ ) { if ( DBIDUtil . equal ( ( ( LeafEntry ) node . getEntry ( i ) ) . getDBID ( ) , id ) ) { return new IndexTreePath <> ( subtree , node . getEntry ( i ) , i ) ; } } } // directory node else { for ( int i = 0 ; i < node . getNumEntries ( ) ; i ++ ) { if ( SpatialUtil . intersects ( node . getEntry ( i ) , mbr ) ) { IndexTreePath < E > childSubtree = new IndexTreePath <> ( subtree , node . getEntry ( i ) , i ) ; IndexTreePath < E > path = findPathToObject ( childSubtree , mbr , id ) ; if ( path != null ) { return path ; } } } } return null ; }
Returns the path to the leaf entry in the specified subtree that represents the data object with the specified mbr and id .