E
- the type of data objects in the tree.public class BKTree<E> extends Object implements RNNSearch<E,E>
Constructor and Description |
---|
BKTree(Metric<E> distance)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Collection<E> data)
Add a dataset into BK-tree.
|
void |
add(E datum)
Add a datum into the BK-tree.
|
void |
add(E[] data)
Add a dataset into BK-tree.
|
boolean |
isIdenticalExcluded()
Get whether if query object self be excluded from the neighborhood.
|
void |
range(E q,
double radius,
List<Neighbor<E,E>> neighbors)
Search the neighbors in the given radius of query object, i.e.
|
void |
range(E q,
int radius,
List<Neighbor<E,E>> neighbors)
Search the neighbors in the given radius of query object, i.e.
|
void |
setIdenticalExcluded(boolean excluded)
Set if exclude query object self from the neighborhood.
|
String |
toString() |
public void add(E[] data)
data
- the dataset to insert into the BK-tree.public void add(Collection<E> data)
data
- the dataset to insert into the BK-tree.public void add(E datum)
public void setIdenticalExcluded(boolean excluded)
public boolean isIdenticalExcluded()
public void range(E q, double radius, List<Neighbor<E,E>> neighbors)
RNNSearch
public void range(E q, int radius, List<Neighbor<E,E>> neighbors)
q
- the query object.radius
- the radius of search range from target.neighbors
- the list to store found neighbors in the given range on output.Copyright © 2015. All rights reserved.