@ Override public Assignments < E > split ( AbstractMTree < ? , N , E , ? > tree , N node ) { final int n = node . getNumEntries ( ) ; int pos1 = random . nextInt ( n ) , pos2 = random . nextInt ( n - 1 ) ; pos2 = pos2 >= pos1 ? pos2 + 1 : pos2 ; // Build distance arrays: double [ ] dis1 = new double [ n ] , dis2 = new double [ n ] ; E e1 = node . getEntry ( pos1 ) , e2 = node . getEntry ( pos2 ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( i == pos1 || i == pos2 ) { continue ; } final E ej = node . getEntry ( i ) ; dis1 [ i ] = tree . distance ( e1 , ej ) ; dis2 [ i ] = tree . distance ( e2 , ej ) ; } return distributor . distribute ( node , pos1 , dis1 , pos2 , dis2 ) ; }
Selects two objects of the specified node to be promoted and stored into the parent node . The m - RAD strategy considers all possible pairs of objects and after partitioning the set of entries promotes the pair of objects for which the sum of covering radiuses is minimum .