generics
This commit is contained in:
parent
3bd0a9518a
commit
14326b0fce
1 changed files with 1 additions and 7 deletions
|
|
@ -13,7 +13,7 @@ public class VpTree<T> {
|
|||
public double distance(T a, T b);
|
||||
}
|
||||
|
||||
private Metric metric;
|
||||
private Metric<T> metric;
|
||||
private Random random;
|
||||
private Node root;
|
||||
|
||||
|
|
@ -72,12 +72,6 @@ public class VpTree<T> {
|
|||
return results;
|
||||
}
|
||||
|
||||
static void swap(ArrayList points, int a, int b) {
|
||||
Object temp = points.get(a);
|
||||
points.set(a, points.get(b));
|
||||
points.set(b, temp);
|
||||
}
|
||||
|
||||
|
||||
Node buildFromPoints(ArrayList<WithDistance> points, int left, int right) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue