@Override
    public Neighbor<double[], E>[] search(double[] q, int k) {
        if (model == null) return super.search(q, k);
        return search(q, k, 0.95, 100);
    }
@Test
    public void testKnn() {
        System.out.println("knn");

        int[] recall = new int[testx.length];
        for (int i = 0; i < testx.length; i++) {
            int k = 7;
            Neighbor[] n1 = lsh.search(testx[i], k, 0.95, 50);
            Neighbor[] n2 = naive.search(testx[i], k);
            for (Neighbor m2 : n2) {
                for (Neighbor m1 : n1) {
                    if (m1.index == m2.index) {
                        recall[i]++;
                        break;
                    }
                }
            }
        }

        System.out.format("q1     of recall is %d%n", MathEx.q1(recall));
        System.out.format("median of recall is %d%n", MathEx.median(recall));
        System.out.format("q3     of recall is %d%n", MathEx.q3(recall));
    }