/** * Find the right leaf node in which to insert * * @param insertBox * @param entries */ private NodeEntry<T>[] chooseLeaf( float[] insertBox, NodeEntry<T>[] entries, List<TraceCell<T>> trace ) { if ( entries[0].next == null ) { return entries; } int index = chooseSubtree( entries, insertBox ); trace.add( new TraceCell<T>( entries, index ) ); return chooseLeaf( insertBox, entries[index].next, trace ); }