MetricKnn API
Fast Similarity Search using the Metric Space Approach
mknn_result.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_RESULT_HPP_
10 #define MKNN_RESULT_HPP_
11 
12 #include "../metricknn_cpp.hpp"
13 
14 namespace mknn {
15 
16 class ResultQuery;
17 class Resolver;
18 
22 class Result {
23 public:
28  long long getNumQueries();
33  double getTotalSearchTime();
38  long long getTotalDistanceEvaluations();
54  ResultQuery getResultQuery(long long num_query);
55 
59  Result();
63  virtual ~Result();
67  Result(const Result &other);
71  Result &operator=(const Result &other);
72 
73 protected:
77  class Impl;
81  std::unique_ptr<Impl> pimpl;
82 
83  friend class Resolver;
84 };
85 
90 class ResultQuery {
91 public:
92  long long num_nns;
93  double *nn_distance;
94  long long *nn_position;
96 };
97 
98 }
99 #endif
ResultQuery getResultQuery(long long num_query)
Returns the result for each query in the query dataset.
std::unique_ptr< Impl > pimpl
Internal opaque class.
Definition: mknn_result.hpp:77
double getTotalSearchTime()
The result of a single query.
Definition: mknn_result.hpp:90
long long num_distance_evaluations
amount of distances evaluated for resolving this query.
Definition: mknn_result.hpp:95
Represents a set of objects of any type.
Definition: mknn_dataset.hpp:23
Result()
Default constructor.
long long * nn_position
the position in the search dataset of each nearest neighbor.
Definition: mknn_result.hpp:94
The result of a search for a set of queries.
Definition: mknn_result.hpp:22
Definition: mevaluation_answers.hpp:18
long long getNumQueries()
virtual ~Result()
Default destructor.
Dataset & getQueryDataset()
long long num_nns
number of nearest neighbors.
Definition: mknn_result.hpp:92
Resolver & getResolver()
Result & operator=(const Result &other)
Assignment operator.
double * nn_distance
the distance of each nearest neighbor to the query object.
Definition: mknn_result.hpp:93
long long getTotalDistanceEvaluations()
A Resolver represents the parameters of a similarity search.
Definition: mknn_resolver.hpp:27
Powered by Download MetricKnn