(V v)
| 826 | } |
| 827 | |
| 828 | public void add(V v) |
| 829 | { |
| 830 | /* |
| 831 | * I1 [Find position for new record ] |
| 832 | * Invoke ChooseLeaf to select a leaf |
| 833 | * node L in which to place E |
| 834 | */ |
| 835 | RNode<V> L = chooseLeaf(v), LL = null; |
| 836 | |
| 837 | /* |
| 838 | * I2 [Add record to leaf node ] If L has |
| 839 | * room for another entry, mstaI.l E |
| 840 | * Othemse mvoke SplitNode to obtam |
| 841 | * L and U contammg E and all the |
| 842 | * old entrees of L |
| 843 | */ |
| 844 | if(L.add(v))//true if we need to split |
| 845 | LL = splitNode(L); |
| 846 | /* |
| 847 | * I3 [Propagate changes upward] Invoke |
| 848 | * AdjustTree on L, also passmg U If a |
| 849 | * spht was performed |
| 850 | */ |
| 851 | AdjustTree(L, LL); |
| 852 | //step I4 handeled in AdjustTree |
| 853 | |
| 854 | size++; |
| 855 | } |
| 856 | |
| 857 | /** |
| 858 | * The minium distance from a query point to the given rectangle |
no test coverage detected