|
bufferkdtree (C sources)
C source code for the Python bufferkdtree implementation
|

Functions | |
| void | transpose_array_float (float *array, int n, int d, float *array_transposed) |
| void | transpose_array_double (double *array, int n, int d, double *array_transposed) |
| void | transpose_array_int (int *array, int n, int d, int *array_transposed) |
| int | compare_floats (const void *p1, const void *p2) |
| int | compare_ints (const void *p1, const void *p2) |
| elem_type | kth_smallest (elem_type a[], int n, int k) |
| int | kth_smallest_idx (elem_type a[], int n, int k) |
| int compare_floats | ( | const void * | p1, |
| const void * | p2 | ||
| ) |
Compares two float values
| Pointer | to first float |
| Pointer | to second float |
| int compare_ints | ( | const void * | p1, |
| const void * | p2 | ||
| ) |
Compares to integers
| Pointer | to first int |
| Pointer | to second int |
Function : kth_smallest() In : array of elements, # of elements in the array, rank k Out : one element Job : find the kth smallest element in the array Notice : use the median() macro defined below to get the median.
Reference:
Author: Wirth, Niklaus Title: Algorithms + data structures = programs Publisher: Englewood Cliffs: Prentice-Hall, 1976 Physical description: 366 p. Series: Prentice-Hall Series in Automatic Computation
| int kth_smallest_idx | ( | elem_type | a[], |
| int | n, | ||
| int | k | ||
| ) |
Computes the kth smallest index
| a[] | Array of type elem_type |
| n | Number of rows |
| Number | of columns |
| void transpose_array_double | ( | double * | array, |
| int | n, | ||
| int | d, | ||
| double * | array_transposed | ||
| ) |
Transposes a given double array
| array | Pointer to double array |
| n | number of "rows" in a |
| d | number of "columns" in a |
| array_transposed | The transposed array |
| void transpose_array_float | ( | float * | array, |
| int | n, | ||
| int | d, | ||
| float * | array_transposed | ||
| ) |
Transposes a given float array
| array | Pointer to float array |
| n | number of "rows" in a |
| d | number of "columns" in a |
| array_transposed | The transposed array |
| void transpose_array_int | ( | int * | array, |
| int | n, | ||
| int | d, | ||
| int * | array_transposed | ||
| ) |
Transposes a given int array
| array | Pointer to int array |
| n | number of "rows" in a |
| d | number of "columns" in a |
| array_transposed | The transposed array |
1.8.6