aboutsummaryrefslogtreecommitdiff
path: root/rrdtool
diff options
context:
space:
mode:
authorLuca Deri <lucaderi@users.noreply.github.com>2024-09-10 16:22:06 +0200
committerGitHub <noreply@github.com>2024-09-10 16:22:06 +0200
commit7fdc4b2472baec0ba0927f861a286ed39ac1c684 (patch)
treefcba54c19d799559433b48b1edbe2a68e366281e /rrdtool
parentf4d2002ce93f1129d5ebf844bad55edfb72216b7 (diff)
Implemented algorithms for K-Nearest Neighbor Search (KNN) (#2554)
* Extended API with functions for vector similarity based on KD-trees https://en.wikipedia.org/wiki/K-d_tree ndpi_kd_tree* ndpi_kd_create(u_int num_dimensions); void ndpi_kd_free(ndpi_kd_tree *tree); void ndpi_kd_clear(ndpi_kd_tree *tree); bool ndpi_kd_insert(ndpi_kd_tree *tree, const double *data_vector, void *user_data); ndpi_kd_tree_result *ndpi_kd_nearest(ndpi_kd_tree *tree, const double *data_vector); u_int32_t ndpi_kd_num_results(ndpi_kd_tree_result *res); bool ndpi_kd_result_end(ndpi_kd_tree_result *res); double* ndpi_kd_result_get_item(ndpi_kd_tree_result *res, double **user_data); bool ndpi_kd_result_next(ndpi_kd_tree_result *res); void ndpi_kd_result_free(ndpi_kd_tree_result *res); double ndpi_kd_distance(double *a1, double *b2, u_int num_dimensions);
Diffstat (limited to 'rrdtool')
0 files changed, 0 insertions, 0 deletions