MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / add

Method add

JSAT/src/jsat/linear/vectorcollection/RTree.java:828–855  ·  view source on GitHub ↗
(V v)

Source from the content-addressed store, hash-verified

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

Callers 15

getVectorCollectionMethod · 0.95
searchKMethod · 0.45
searchRMethod · 0.45
buildTreeMethod · 0.45
searchMethod · 0.45
searchMethod · 0.45
simpleInsertMethod · 0.45
TreeNodeMethod · 0.45
findNNMethod · 0.45
addChildMethod · 0.45
maxdistMethod · 0.45
searchMethod · 0.45

Calls 3

chooseLeafMethod · 0.95
splitNodeMethod · 0.95
AdjustTreeMethod · 0.95

Tested by

no test coverage detected