I have read few sources on VP-tree for similarity knn. No one wrote about adding an element to exists tree, which is required for maintenance. Explanation of adding element will be just great.
问问题
370 次
1 回答
0
add
public boolean add(E point)
Adds a single point to this vp-tree. Addition of a point executes in O(log n) time in the best case (where n is the number of points in the tree), but may also trigger a node partition that takes additional time.
Specified by:
add in interface Collection<E extends GeospatialPoint>
Parameters:
point - the point to add to this tree
Returns:
true if the tree was modified by the addition of this point; vp-trees are always modified by adding points, so this method always returns true
addAll
public boolean addAll(Collection<? extends E> points)
Adds all of the points in the given collection to this vp-tree.
Specified by:
addAll in interface Collection<E extends GeospatialPoint>
Parameters:
points - the points to add to this tree
Returns:
true if the tree was modified by the addition of the points; vp-trees are always modified by adding points, so this method always returns true
该接口来自VPTree (jeospatial)。
因此,您能做的最好的事情就是联系作者和/或在此处搜索算法。
你明白我希望这对 SO 来说太宽泛了,因此答案主要是一个链接的。
于 2014-12-02T06:53:17.550 回答