Functions | |
| double | cpl_tools_kth_double (double *a, int n, int k) |
| Get the kth smallest value in a double array. More... | |
| float | cpl_tools_kth_float (float *a, int n, int k) |
| Get the kth smallest value in a float array. More... | |
| int | cpl_tools_kth_int (int *a, int n, int k) |
| Get the kth smallest value in an integer array. More... | |
| cpl_error_code | cpl_tools_darray_sort (double *pix_arr, int n) |
| Sort a double array. More... | |
| cpl_error_code | cpl_tools_iarray_sort (int *pix_arr, int n) |
| Sort an integer array. More... | |
| double | cpl_tools_median_9double (double *p) |
| Optimized median computation for 9 values arrays. More... | |
| double | cpl_tools_median_double (double *a, int n) |
| Get the median value in a double array. More... | |
| float | cpl_tools_median_float (float *a, int n) |
| Get the median value in a float array. More... | |
| int | cpl_tools_median_int (int *a, int n) |
| Get the median value in an integer array. More... | |
| double | cpl_tools_cputime (int mode) |
| Timer handling for benchmarking purposes. More... | |
#include "cpl_tools.h"
|
|
Timer handling for benchmarking purposes.
CLOCK_TIME to get the total elapsed time.
The call with CLOCK_START returns the total elapsed time in seconds since the begining. The call with CLOCK_STOP returns the time elapsed since the last CLOCK_START call. The call with CLOCK_TIME return the total time elapsed between all previous CLOCK_START - CLOCK_STOP calls. Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Sort a double array.
|
|
||||||||||||
|
Sort an integer array.
|
|
||||||||||||||||
|
Get the kth smallest value in a double array.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||
|
Get the kth smallest value in a float array.
|
|
||||||||||||||||
|
Get the kth smallest value in an integer array.
|
|
|
Optimized median computation for 9 values arrays.
|
|
||||||||||||
|
Get the median value in a double array.
Example: the median of (1 2 3) is 2 and the median of (1 2 3 4) is 2. |
|
||||||||||||
|
Get the median value in a float array.
|
|
||||||||||||
|
Get the median value in an integer array.
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002