MetricKnn API
Fast Similarity Search using the Metric Space Approach
mknn_predefined_distance.h
Go to the documentation of this file.
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_DISTANCE_H_
10 #define MKNN_PREDEFINED_DISTANCE_H_
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 #include "../metricknn_c.h"
17 
42 
48 void mknn_predefDistance_helpPrintDistance(const char *id_dist);
49 
56 bool mknn_predefDistance_testDistanceId(const char *id_dist);
57 
75 
89 
116 
132 
146 
162 
176 
193 
211 
227 MknnDistanceParams *mknn_predefDistance_EMD(int64_t matrix_rows,
228  int64_t matrix_cols, double *cost_matrix, bool normalize_vectors);
229 
249  int64_t num_dims_discard, double pct_discard, double threshold_discard);
250 
268 MknnDistanceParams *mknn_predefDistance_MultiDistance(int64_t num_subdistances,
269  MknnDistance **subdistances,
270  bool free_subdistances_on_release, double *normalization_values,
271  double *ponderation_values,
272  bool with_auto_config, MknnDataset *auto_config_dataset,
273  double auto_normalize_alpha, bool auto_ponderation_maxrho,
274  bool auto_ponderation_maxtau);
275 
276 #ifdef __cplusplus
277 }
278 #endif
279 
280 #endif
Definition: parameters.c:18
Definition: distance.c:17
MknnDistanceParams * mknn_predefDistance_EMD(int64_t matrix_rows, int64_t matrix_cols, double *cost_matrix, bool normalize_vectors)
Creates an object for Earth Mover's Distance.
Definition: predefined_distance.c:66
MknnDistanceParams * mknn_predefDistance_CosineDistance(bool normalize_vectors)
Creates an object for Cosine Distance.
Definition: predefined_distance.c:59
MknnDistanceParams * mknn_predefDistance_L2()
Creates an object for Euclidean distance.
Definition: predefined_distance.c:16
void mknn_predefDistance_helpPrintDistance(const char *id_dist)
Prints to standard output the help for a distance.
Definition: distance.c:111
Definition: dataset.c:11
bool mknn_predefDistance_testDistanceId(const char *id_dist)
Tests whether the given string references a valid pre-defined distance.
Definition: distance.c:116
MknnDistanceParams * mknn_predefDistance_Chi2()
Creates an object for Chi2 distance.
Definition: predefined_distance.c:42
MknnDistanceParams * mknn_predefDistance_L2squared()
Creates an object for squared Euclidean distance.
Definition: predefined_distance.c:21
MknnDistanceParams * mknn_predefDistance_Lp(double order)
Creates an object for Minkowski distance.
Definition: predefined_distance.c:31
MknnDistanceParams * mknn_predefDistance_L1()
Creates an object for Manhattan or Taxi-cab distance.
Definition: predefined_distance.c:11
MknnDistanceParams * mknn_predefDistance_Hamming()
Creates an object for Hamming distance.
Definition: predefined_distance.c:37
void mknn_predefDistance_helpListDistances()
Lists to standard output all pre-defined distances.
Definition: distance.c:95
MknnDistanceParams * mknn_predefDistance_DPF(double order, int64_t num_dims_discard, double pct_discard, double threshold_discard)
Creates an object for Dynamic Partial Function distance.
Definition: predefined_distance.c:77
MknnDistanceParams * mknn_predefDistance_Lmax()
Creates an object for L-max distance.
Definition: predefined_distance.c:26
MknnDistanceParams * mknn_predefDistance_CosineSimilarity(bool normalize_vectors)
Creates an object for Cosine Similarity.
Definition: predefined_distance.c:52
MknnDistanceParams * mknn_predefDistance_MultiDistance(int64_t num_subdistances, MknnDistance **subdistances, bool free_subdistances_on_release, double *normalization_values, double *ponderation_values, bool with_auto_config, MknnDataset *auto_config_dataset, double auto_normalize_alpha, bool auto_ponderation_maxrho, bool auto_ponderation_maxtau)
Defines a multi-distance, which is a weighted combination of distances.
Definition: predefined_distance.c:88
MknnDistanceParams * mknn_predefDistance_Hellinger()
Creates an object for Hellinger distance.
Definition: predefined_distance.c:47
Powered by Download MetricKnn