MetricKnn API
Fast Similarity Search using the Metric Space Approach
Classes | Functions
mknn_result.h File Reference

A MknnResult stores the result for a query dataset, and MknnResultQuery stores the result for each query object. More...

#include "../metricknn_c.h"

Go to the source code of this file.

Classes

struct  MknnResultQuery
 The result of a single query. More...
 

Functions

int64_t mknn_result_getNumQueries (MknnResult *result)
 
double mknn_result_getTotalSearchTime (MknnResult *result)
 
int64_t mknn_result_getTotalDistanceEvaluations (MknnResult *result)
 
MknnResolvermknn_result_getResolver (MknnResult *result)
 
MknnDatasetmknn_result_getQueryDataset (MknnResult *result)
 
MknnResultQuerymknn_result_getResultQuery (MknnResult *result, int64_t num_query)
 Returns the result for each query in the query dataset. More...
 
void mknn_result_release (MknnResult *result)
 Releases the result of a search (including the result for each query) that may have been returned by mknn_result_getResultQuery. More...
 

Detailed Description

A MknnResult stores the result for a query dataset, and MknnResultQuery stores the result for each query object.

MknnResultQuery is non-opaque, thus the results can be read be accessing the object attributes. Note that MknnResultQuery objects are binded to MknnResult, thus by releasing MknnResult (mknn_result_release) all the MknnResultQuery objects will be released too.

Function Documentation

int64_t mknn_result_getNumQueries ( MknnResult result)
Parameters
result
Returns
amount of resolved queries.
MknnDataset* mknn_result_getQueryDataset ( MknnResult result)
Parameters
result
Returns
the query dataset that generated this result.
MknnResolver* mknn_result_getResolver ( MknnResult result)
Parameters
result
Returns
the resolver that generated this result.
MknnResultQuery* mknn_result_getResultQuery ( MknnResult result,
int64_t  num_query 
)

Returns the result for each query in the query dataset.

Parameters
result
num_querythe number of query to return, between 0 and mknn_result_getNumQueries - 1.
Returns
result for each query object.
int64_t mknn_result_getTotalDistanceEvaluations ( MknnResult result)
Parameters
result
Returns
total amount of distances evaluated during the search.
double mknn_result_getTotalSearchTime ( MknnResult result)
Parameters
result
Returns
total time in seconds spent by the search.
void mknn_result_release ( MknnResult result)

Releases the result of a search (including the result for each query) that may have been returned by mknn_result_getResultQuery.

Parameters
resultthe result object to be released.
Powered by Download MetricKnn