bufferkdtree (C sources)
C source code for the Python bufferkdtree implementation
|
#include "include/util.h"
Functions | |
void | set_default_parameters (KD_TREE_PARAMETERS *params) |
void | check_parameters (KD_TREE_PARAMETERS *params) |
void | partition_array_via_pivot (void *array, int count, int axis, int size_per_elt, FLOAT_TYPE pivot_value) |
void | swap_elements (void *p1, void *p2, int size_elt) |
void | copy_element (void *dest, const void *src, int size_elt) |
FLOAT_TYPE | squared (FLOAT_TYPE a) |
FLOAT_TYPE | kd_tree_dist (const FLOAT_TYPE *a, const FLOAT_TYPE *b, int dim) |
void check_parameters | ( | KD_TREE_PARAMETERS * | params | ) |
Sanity check for parameters
*params | Pointer to struct containg the parameters to be checked |
|
inline |
Copies an element (used by kd_tree_split_training_patterns_via_pivot)
*dest | Pointer to the destination |
*src | Pointer to the source element |
size_elt | Number of bytes per element |
|
inline |
Computes the distance between point a and b in R^dim
*a | Pointer to first point |
*b | Pointer to second point |
dim | Dimensionality of points |
void partition_array_via_pivot | ( | void * | array, |
int | count, | ||
int | axis, | ||
int | size_per_elt, | ||
FLOAT_TYPE | pivot_value | ||
) |
Partitions a given array based on a pivot element and a given axis
*array | The array that shall be processed |
count | The number of elements in the array |
axis | The axis that shall be used |
size_per_elt | Number of bytes a single element occupies |
pivot_value | The pivot element (FLOAT_TYPE) |
void set_default_parameters | ( | KD_TREE_PARAMETERS * | params | ) |
Sets default parameters.
*params | Pointer to struct containg the parameters to be updated |
|
inline |
Computes the square value a*a for a given a.
a | The value to be squared |
|
inline |
Swaps two elements (used by kd_tree_split_training_patterns_via_pivot)
*p1 | Pointer to first element |
*p2 | Pointer to second element |
size_elt | Number of bytes per element |