Package org.apache.mahout.knn.search

Examples of org.apache.mahout.knn.search.BruteSearch.addAll()


    System.out.printf("Generated query matrix.\n");

    for (int threads : new int[]{1, 2, 3, 4, 5, 6, 10, 20, 50}) {
      for (int block : new int[]{1, 10, 50}) {
        BruteSearch search = new BruteSearch(new EuclideanDistanceMeasure());
        search.addAll(referenceVectors);
        long t0 = System.nanoTime();
        search.search(queryVectors, block, threads);
        long t1 = System.nanoTime();
        System.out.printf("%d\t%d\t%.2f\n", threads, block, (t1 - t0) / 1e9);
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.