|
TPCCLIB
|
Header file for libtpcstatist. More...
#include "tpcclibConfig.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include "tpcextensions.h"Go to the source code of this file.
Functions | |
| int | statMeanSD (double *data, unsigned int n, double *mean, double *sd, unsigned int *vn) |
| int | fstatMeanSD (float *data, unsigned int n, float *mean, float *sd, unsigned int *vn) |
| double | statMedian (double *a, const int n) |
| double | statKthSmallest (double *a, const int n, const int k) |
| void | statSortInt (int *data, unsigned int n, int order) |
| void | statSortUnsigned (unsigned int *data, unsigned int n, int order) |
| void | statSortDouble (double *data, unsigned int n, int order) |
|
extern |
Calculate mean and sample standard deviation in an array of given float data. NaNs in the data are left out.
| data | Pointer to data array of size n; data is not changed in any way. |
| n | Length of data array. |
| mean | Pointer to variable where mean will be written; enter NULL if not needed. |
| sd | Pointer to variable where SD will be written; enter NULL if not needed. |
| vn | Pointer to variable where the number of valid (not NaN) samples will be written; enter NULL if not needed. |
Definition at line 73 of file mean.c.
|
extern |
Returns the kth smallest value in an array of given data.
Algorithm is based on the book Wirth N. Algorithms + data structures = programs. Englewood Cliffs, Prentice-Hall, 1976.
| a | Pointer to data array of size n; data is partially sorted. NaNs are not checked but will lead to a wrong result. |
| n | Length of the data array |
| k | The K value, 0<=K<n. |
Definition at line 55 of file median.c.
Referenced by statMedian().
|
extern |
Calculate mean and sample standard deviation in an array of given data. NaNs in the data are left out.
| data | Pointer to data array of size n; data is not changed in any way. |
| n | Length of data array. |
| mean | Pointer to variable where mean will be written; enter NULL if not needed. |
| sd | Pointer to variable where SD will be written; enter NULL if not needed. |
| vn | Pointer to variable where the number of valid (not NaN) samples will be written; enter NULL if not needed. |
Definition at line 25 of file mean.c.
Referenced by nloptIATGO(), nloptMPSOabsvMean(), and nloptMPSOpMean().
|
extern |
Returns the median in an array of given data. Algorithm is based on the book Wirth N. Algorithms + data structures = programs. Englewood Cliffs, Prentice-Hall, 1976.
| a | Pointer to data array of size n; data is partially sorted. NaNs are not checked but will lead to a wrong result. |
| n | Length of data array. |
Definition at line 25 of file median.c.
|
extern |
Sort the given double list into ascending or descending order.
| data | Pointer to data array of size n |
| n | Length of data array |
| order | Ascending (0) or descending (<>0) order |
Definition at line 99 of file sort.c.
Referenced by tacInput2sim().
|
extern |
Sort the given integer list into ascending or descending order.
| data | Pointer to data array of size n |
| n | Length of data array |
| order | Ascending (0) or descending (<>0) order |
Definition at line 63 of file sort.c.
|
extern |
Sort the given unsigned integer list into ascending or descending order.
| data | Pointer to data array of size n |
| n | Length of data array |
| order | Ascending (0) or descending (<>0) order |
Definition at line 81 of file sort.c.