MetricKnn API
Fast Similarity Search using the Metric Space Approach
mknn_predefined_index.hpp
1 /*
2  * Copyright (C) 2012-2015, Juan Manuel Barrios <juanmanuel@barrios.cl>
3  * All rights reserved.
4  *
5  * This file is part of MetricKnn.
6  * MetricKnn is made available under the terms of the BSD 2-Clause License.
7  */
8 
9 #ifndef MKNN_PREDEFINED_INDEX_HPP_
10 #define MKNN_PREDEFINED_INDEX_HPP_
11 
12 #include "../metricknn_cpp.hpp"
13 
14 namespace mknn {
15 
24 class PredefIndex {
25 public:
33  static void helpListIndexes();
34 
40  static void helpPrintIndex(std::string id_index);
47  static bool testIndexId(std::string id_index);
75  double range, long long max_threads);
76 
86  long long knn, long long max_threads);
87 
105  static IndexParams Laesa_indexParams(long long num_pivots);
115  double range, long long max_threads);
126  long long knn, double range, long long max_threads,
127  double approximation_percentage);
128 
146  static IndexParams SnakeTable_indexParams(long long num_pivots);
156  double range, long long max_threads);
157 
174 
183  static IndexParams FlannKdTree_indexParams(long long num_trees);
184 
194  static IndexParams FlannKmeansTree_indexParams(long long branching,
195  long long iterations);
196 
207  static IndexParams FlannLSH_indexParams(long long table_number,
208  long long key_size, long long multi_probe_level);
220  static IndexParams FlannAutoIndex_indexParams(double target_precision,
221  double build_weight, double memory_weight, double sample_fraction);
230  long long max_threads);
231 
242  long long knn, long long max_threads, long long num_checks);
243 
248 };
249 
250 }
251 
252 #endif
static ResolverParams Laesa_resolverExactNearestNeighbors(long long knn, double range, long long max_threads)
Creates a new resolver for exact search using the LAESA index.
static ResolverParams Flann_resolverExactNearestNeighbors(long long knn, long long max_threads)
Creates a new resolver for exact searches using FLANN's indexes.
static ResolverParams LinearScan_resolverExactNearestNeighbors(long long knn, double range, long long max_threads)
Creates a new resolver for exact search of the K nearest neighbors using the linear scan index...
Stores parameters in an internal map, which associates a names with its value.
Definition: mknn_params.hpp:223
static IndexParams FlannAutoIndex_indexParams(double target_precision, double build_weight, double memory_weight, double sample_fraction)
Resolves searches using FLANN's automatic selection of the best algorithm.
static ResolverParams Laesa_resolverApproximateNearestNeighbors(long long knn, double range, long long max_threads, double approximation_percentage)
static IndexParams LinearScan_indexParams()
Resolves searches using the linear scan algorithm.
static IndexParams SnakeTable_indexParams(long long num_pivots)
Resolves searches using a Snake Table.
static IndexParams Laesa_indexParams(long long num_pivots)
Resolves searches using the LAESA algorithm.
static IndexParams FlannLSH_indexParams(long long table_number, long long key_size, long long multi_probe_level)
Resolves searches using FLANN's implementation of Local Sensitive Hashing.
static IndexParams FlannKdTree_indexParams(long long num_trees)
Resolves searches using FLANN's implementation of kd-tree.
static ResolverParams LinearScan_resolverExactFarthestNeighbors(long long knn, long long max_threads)
Creates a new resolver for exact search of the K farthest neighbors using the linear scan index...
Stores parameters in an internal map, which associates a names with its value.
Definition: mknn_params.hpp:417
static IndexParams FlannKmeansTree_indexParams(long long branching, long long iterations)
Resolves searches using FLANN's implementation of k-means tree.
static IndexParams FlannLinearScan_indexParams()
Resolves searches using the FLANN's implementation of linear scan algorithm.
Definition: mevaluation_answers.hpp:18
static void helpListIndexes()
Lists to standard output all pre-defined indexes.
static ResolverParams Flann_resolverApproximateNearestNeighbors(long long knn, long long max_threads, long long num_checks)
Creates a new resolver for approximate searches using FLANN's indexes.
static bool testIndexId(std::string id_index)
Tests whether the given string references a valid pre-defined index.
static void helpPrintIndex(std::string id_index)
Prints to standard output the help for a index.
MetricKnn provides a set of pre-defined indexes.
Definition: mknn_predefined_index.hpp:24
static ResolverParams SnakeTable_resolverExactNearestNeighbors(long long knn, double range, long long max_threads)
Creates a new resolver for exact search using the SnakeTable index.
Powered by Download MetricKnn