#include "Tree/ball_algorithm.h"#include "Tree/KNN.hpp"#include "Basic/AStringable.hpp"#include "Basic/VectorHelper.hpp"#include "Space/SpacePoint.hpp"Functions | |
| double ** | copy_double_arrAsVVD (const VectorVectorDouble &arr) |
| double ** | copy_double_arr (const double **arr, int row, int col) |
| int ** | copy_int_arr (const int **arr, int row, int col) |
| void | swap (int *arr, int i1, int i2) |
| void | btree_zero (t_btree *b) |
| int | init_node (t_btree *b, int i_node, int idx_start, int idx_end) |
| int | find_node_split_dim (double **data, const int *node_indices, int n_features, int n_points) |
| int | partition_node_indices (double **data, int *node_indices, int split_dim, int n_points, int split_index) |
| void | recursive_build (t_btree *b, int i_node, int idx_start, int idx_end) |
| void | define_dist_function (double(*dist_function)(const double *x1, const double *x2, int size), int default_distance_function) |
| t_btree * | btree_init (const double **data, int n_samples, int n_features, double(*dist_function)(const double *x1, const double *x2, int size), int leaf_size, int default_distance_function) |
| double | min_dist (t_btree *tree, int i_node, const double *pt) |
| int | query_depth_first (t_btree *b, int i_node, const double *pt, int i_pt, t_nheap *heap, double dist) |
| void | free_2d_double (double **arr, int row) |
| void | free_2d_int (int **arr, int row) |
| void | free_tree (t_btree *tree) |
| void | btree_display (const t_btree *tree, int level) |
| double | manhattan_distance (const double *x1, const double *x2, int size) |
| double | euclidean_distance (const double *x1, const double *x2, int size) |
Variables | |
| static double(* | st_distance_function )(const double *, const double *, int) = euclidean_distance |
| void btree_display | ( | const t_btree * | tree, |
| int | level | ||
| ) |
| t_btree* btree_init | ( | const double ** | data, |
| int | n_samples, | ||
| int | n_features, | ||
| double(*)(const double *x1, const double *x2, int size) | dist_function, | ||
| int | leaf_size, | ||
| int | default_distance_function | ||
| ) |
| void btree_zero | ( | t_btree * | b | ) |
| double** copy_double_arr | ( | const double ** | arr, |
| int | row, | ||
| int | col | ||
| ) |
| double** copy_double_arrAsVVD | ( | const VectorVectorDouble & | arr | ) |
| int** copy_int_arr | ( | const int ** | arr, |
| int | row, | ||
| int | col | ||
| ) |
| void define_dist_function | ( | double(*)(const double *x1, const double *x2, int size) | dist_function, |
| int | default_distance_function | ||
| ) |
| double euclidean_distance | ( | const double * | x1, |
| const double * | x2, | ||
| int | size | ||
| ) |
Returns the Standard distance between two points
| x1 | Vector of coordinates for the first point |
| x2 | Vector of coordinates for the second point |
| size | Number of coordinates |
| int find_node_split_dim | ( | double ** | data, |
| const int * | node_indices, | ||
| int | n_features, | ||
| int | n_points | ||
| ) |
| void free_2d_double | ( | double ** | arr, |
| int | row | ||
| ) |
| void free_2d_int | ( | int ** | arr, |
| int | row | ||
| ) |
| void free_tree | ( | t_btree * | tree | ) |
| int init_node | ( | t_btree * | b, |
| int | i_node, | ||
| int | idx_start, | ||
| int | idx_end | ||
| ) |
| double manhattan_distance | ( | const double * | x1, |
| const double * | x2, | ||
| int | size | ||
| ) |
Returns the Manhattan distance between two points
| x1 | Vector of coordinates for the first point |
| x2 | Vector of coordinates for the second point |
| size | Number of coordinates |
| double min_dist | ( | t_btree * | tree, |
| int | i_node, | ||
| const double * | pt | ||
| ) |
| int partition_node_indices | ( | double ** | data, |
| int * | node_indices, | ||
| int | split_dim, | ||
| int | n_points, | ||
| int | split_index | ||
| ) |
| int query_depth_first | ( | t_btree * | b, |
| int | i_node, | ||
| const double * | pt, | ||
| int | i_pt, | ||
| t_nheap * | heap, | ||
| double | dist | ||
| ) |
| void recursive_build | ( | t_btree * | b, |
| int | i_node, | ||
| int | idx_start, | ||
| int | idx_end | ||
| ) |
| void swap | ( | int * | arr, |
| int | i1, | ||
| int | i2 | ||
| ) |
|
static |