File indexing completed on 2025-12-15 10:17:33
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #ifndef __GSL_RSTAT_H__
0021 #define __GSL_RSTAT_H__
0022
0023 #include <stdlib.h>
0024
0025 #undef __BEGIN_DECLS
0026 #undef __END_DECLS
0027 #ifdef __cplusplus
0028 # define __BEGIN_DECLS extern "C" {
0029 # define __END_DECLS }
0030 #else
0031 # define __BEGIN_DECLS
0032 # define __END_DECLS
0033 #endif
0034
0035 __BEGIN_DECLS
0036
0037 typedef struct
0038 {
0039 double p;
0040 double q[5];
0041 int npos[5];
0042 double np[5];
0043 double dnp[5];
0044 size_t n;
0045 } gsl_rstat_quantile_workspace;
0046
0047 gsl_rstat_quantile_workspace *gsl_rstat_quantile_alloc(const double p);
0048 void gsl_rstat_quantile_free(gsl_rstat_quantile_workspace *w);
0049 int gsl_rstat_quantile_reset(gsl_rstat_quantile_workspace *w);
0050 int gsl_rstat_quantile_add(const double x, gsl_rstat_quantile_workspace *w);
0051 double gsl_rstat_quantile_get(gsl_rstat_quantile_workspace *w);
0052
0053 typedef struct
0054 {
0055 double min;
0056 double max;
0057 double mean;
0058 double M2;
0059 double M3;
0060 double M4;
0061 size_t n;
0062 gsl_rstat_quantile_workspace *median_workspace_p;
0063 } gsl_rstat_workspace;
0064
0065 gsl_rstat_workspace *gsl_rstat_alloc(void);
0066 void gsl_rstat_free(gsl_rstat_workspace *w);
0067 size_t gsl_rstat_n(const gsl_rstat_workspace *w);
0068 int gsl_rstat_add(const double x, gsl_rstat_workspace *w);
0069 double gsl_rstat_min(const gsl_rstat_workspace *w);
0070 double gsl_rstat_max(const gsl_rstat_workspace *w);
0071 double gsl_rstat_mean(const gsl_rstat_workspace *w);
0072 double gsl_rstat_variance(const gsl_rstat_workspace *w);
0073 double gsl_rstat_sd(const gsl_rstat_workspace *w);
0074 double gsl_rstat_rms(const gsl_rstat_workspace *w);
0075 double gsl_rstat_norm(const gsl_rstat_workspace *w);
0076 double gsl_rstat_sd_mean(const gsl_rstat_workspace *w);
0077 double gsl_rstat_median(gsl_rstat_workspace *w);
0078 double gsl_rstat_skew(const gsl_rstat_workspace *w);
0079 double gsl_rstat_kurtosis(const gsl_rstat_workspace *w);
0080 int gsl_rstat_reset(gsl_rstat_workspace *w);
0081
0082 __END_DECLS
0083
0084 #endif