15 #define MAX(a,b) ( (a) > (b) ? (a) : (b) )
19 #define MIN(a,b) ( (a) < (b) ? (a) : (b) )
22 #define MAX_DOUBLE 1.7976931348623157e+308
23 #define MIN_DOUBLE 4.9e-300
52 extern int __maxidx(
double* data,
int size );
53 extern double __max(
double* data,
int size );
54 extern double __min(
double* data,
int size );
55 extern double ipow(
double val,
int expo);
59 extern double gamma(
double c);
60 extern double gammaln(
double c);
62 extern double gammainc(
double x,
double a);
64 extern double beta(
double alpha,
double beta);
65 extern double betaln(
double alpha,
double beta);
66 extern double betainc(
double x,
double alpha,
double beta);
68 extern double choose(
double n,
double r);
69 extern double chooseln(
double n,
double r);
70 extern double gampdf(
double x,
double alpha,
double beta);
71 extern double gamcdf(
double x,
double alpha,
double beta);
72 extern double betapdf(
double x,
double alpha,
double beta);
73 extern double chi2pdf(
double x,
int df);
74 extern double chi2cdf(
double x,
int df);
75 extern double fpdf(
double x,
int df1,
int df2 );
76 extern double fcdf(
double x,
int df1,
int df2 );
77 extern double tpdf(
double x,
int df);
78 extern double tcdf(
double x,
int df);
79 extern double binopdf(
int x,
int n,
double p);
80 extern double binocdf(
int x,
int n,
double p);
81 extern double poisspdf(
int x,
double lambda);
82 extern double poisscdf(
int x,
double lambda );
83 extern double exppdf(
double x,
double mu );
84 extern double exprnd(
double mu);
85 extern double reylpdf(
double x,
double b);
86 extern double normpdf(
double x,
double mu,
double sigma);
87 extern double normrnd(
double mu,
double sigma);
88 extern double normcdf(
double x,
double mu,
double sigma);
89 extern double norminv(
double x,
double mu,
double sigma);
90 extern double mean(
double* data,
int size);
91 extern double variance(
double* data,
int size);
92 extern double summation(
double* data,
int size);
93 extern double*
vector_fraction(
double* data,
int size,
double denominator);
94 extern int comp_double (
const void * elem1,
const void * elem2);
96 extern double pvalue(
double v,
const double* conddist,
int size );
98 extern double fminsearch(pFMinSearch pfm,
double* X0);
121 extern pHistogram
histogram_new(
double* data,
int nsamples,
int nbins);
161 extern pANOVA
anova_new(
int nways,
int* ngrps);
162 extern void anova(pANOVA panova, ... );
165 extern void anovan_run(pANOVA panova, va_list ap);
167 extern void anova_print(pANOVA panova,
char** name);
double * fminsearch_get_minX(pFMinSearch pfm)
Definition: fminsearch.cpp:304
double beta(double alpha, double beta)
Definition: mathfunc.c:156
void fminsearch_free(pFMinSearch pfm)
Definition: fminsearch.cpp:46
int * ngrps
Definition: mathfunc.h:151
double fminsearch(pFMinSearch pfm, double *X0)
double vSS
Definition: mathfunc.h:140
void * args
Definition: mathfunc.h:46
void anova_free(pANOVA panova)
Definition: grpcmp.c:122
double ** vsort
Definition: mathfunc.h:40
pANOVA anova_new(int nways, int *ngrps)
Definition: grpcmp.c:86
double normpdf(double x, double mu, double sigma)
Definition: mathfunc.c:420
int maxiters
Definition: mathfunc.h:30
double cmp_two_indep_chi2test(double *grp1, double *grp2, int size)
Definition: grpcmp.c:62
Definition: mathfunc.h:148
int iters
Definition: mathfunc.h:37
struct tagHistogram Histogram
int df
Definition: mathfunc.h:137
void fminsearch_set_equation(pFMinSearch pfm, math_func eq, int Xsize, void *args)
Definition: fminsearch.cpp:53
double(* math_func)(double *x, void *args)
Definition: mathfunc.h:26
void histogram_set_by_unit(pHistogram phist, double *data, int nsample, double unit)
Definition: histogram.c:171
double normcdf(double x, double mu, double sigma)
Definition: mathfunc.c:632
double gammaincln(double x, double a)
Definition: mathfunc.c:143
double width
Definition: mathfunc.h:112
double pvalue(double v, const double *conddist, int size)
Definition: mathfunc.c:663
void anova(pANOVA panova,...)
Definition: grpcmp.c:231
double betaln(double alpha, double beta)
Definition: mathfunc.c:161
double reylpdf(double x, double b)
double binocdf(int x, int n, double p)
Definition: mathfunc.c:332
math_func eq
Definition: mathfunc.h:47
Definition: mathfunc.h:135
double fminsearch_get_minF(pFMinSearch pfm)
Definition: fminsearch.cpp:309
double pvalue
Definition: mathfunc.h:143
double __min(double *data, int size)
Definition: mathfunc.c:42
Definition: mathfunc.h:28
double chi2cdf(double x, int df)
Definition: mathfunc.c:284
double ipow(double val, int expo)
Definition: mathfunc.c:60
double * mean
Definition: mathfunc.h:138
double MS
Definition: mathfunc.h:141
int histogram_get_count(pHistogram phist, double p)
Definition: histogram.c:284
double zero_delta
Definition: mathfunc.h:34
ANOVAResultElement total
Definition: mathfunc.h:155
double summation(double *data, int size)
Definition: mathfunc.c:691
pANOVAResultElement value
Definition: mathfunc.h:154
double __max(double *data, int size)
Definition: mathfunc.c:27
int * idx
Definition: mathfunc.h:44
pHistogram histogram_new(double *data, int nsamples, int nbins)
Definition: histogram.c:9
double poisscdf(int x, double lambda)
Definition: mathfunc.c:357
double cmp_paired_t_test(double *grp1, double *grp2, int size)
Definition: grpcmp.c:9
double max
Definition: mathfunc.h:113
ANOVAResultElement error
Definition: mathfunc.h:156
void anovan_run(pANOVA panova, va_list ap)
double exppdf(double x, double mu)
Definition: mathfunc.c:395
double chooseln(double n, double r)
Definition: mathfunc.c:224
double * fv
Definition: mathfunc.h:39
double * x_r
Definition: mathfunc.h:42
double gamcdf(double x, double alpha, double beta)
Definition: mathfunc.c:260
double F
Definition: mathfunc.h:142
void histogram_set_by_bin(pHistogram phist, double *data, int nsample, int nbins)
Definition: histogram.c:144
void anova_print(pANOVA panova, char **name)
Definition: grpcmp.c:343
void * data
Definition: mathfunc.h:152
double unifrnd()
Definition: mathfunc.c:91
int * num
Definition: mathfunc.h:139
double mean(double *data, int size)
Definition: mathfunc.c:646
int __maxidx(double *data, int size)
Definition: mathfunc.c:9
double gamma(double c)
Definition: mathfunc.c:100
int nbins
Definition: mathfunc.h:110
int fminsearch_min(pFMinSearch pfm, double *X0)
Definition: fminsearch.cpp:264
pFMinSearch fminsearch_new()
Definition: fminsearch.cpp:7
void histogram_set_with_preset_point(pHistogram phist, double *data, int nsamples, double *point, int nbins)
Definition: histogram.c:214
ANOVA * pANOVA
Definition: mathfunc.h:159
pFMinSearch fminsearch_new_with_eq(math_func eq, int Xsize, void *args)
Definition: fminsearch.cpp:23
double sigma
Definition: mathfunc.h:32
double tolx
Definition: mathfunc.h:33
void anova_print_data(pANOVA panova)
Definition: grpcmp.c:360
double histogram_compare(pHistogram phist1, pHistogram phist2)
Definition: histogram.c:389
ANOVAResultElement * pANOVAResultElement
Definition: mathfunc.h:146
struct tagANOVAResultElement ANOVAResultElement
void histogram_free(pHistogram phist)
Definition: histogram.c:77
double * point
Definition: mathfunc.h:115
FMinSearch * pFMinSearch
Definition: mathfunc.h:50
void anova2_run(pANOVA panova)
Definition: grpcmp.c:279
double variance(double *data, int size)
Definition: mathfunc.c:654
double gammaln(double c)
Definition: mathfunc.c:112
double betainc(double x, double alpha, double beta)
Definition: mathfunc.c:207
double norminv(double x, double mu, double sigma)
Definition: mathfunc.c:637
int nsamples
Definition: mathfunc.h:111
double * vector_fraction(double *data, int size, double denominator)
Definition: mathfunc.c:702
double ** v
Definition: mathfunc.h:38
unsigned int * count
Definition: mathfunc.h:116
double * x_tmp
Definition: mathfunc.h:43
int histogram_merge(pHistogram phist, pHistogram parg)
Definition: histogram.c:296
double gampdf(double x, double alpha, double beta)
Definition: mathfunc.c:245
double binopdf(int x, int n, double p)
Definition: mathfunc.c:327
void histogram_print(pHistogram phist, FILE *fp)
Definition: histogram.c:365
tuple args
Definition: mcl2rawcafe.py:48
int nways
Definition: mathfunc.h:150
double fcdf(double x, int df1, int df2)
Definition: mathfunc.c:302
double poisspdf(int x, double lambda)
Definition: mathfunc.c:352
void histogram_set_sparse_data(pHistogram phist, double *data, int nsamples)
Definition: histogram.c:233
double choose(double n, double r)
Definition: mathfunc.c:219
Histogram * pHistogram
Definition: mathfunc.h:119
double chi2pdf(double x, int df)
Definition: mathfunc.c:279
int N1
Definition: mathfunc.h:36
void anova1_run(pANOVA panova)
Definition: grpcmp.c:246
double histogram_get_prob(pHistogram phist, double p)
Definition: histogram.c:291
double tcdf(double x, int df)
Definition: mathfunc.c:317
double min
Definition: mathfunc.h:113
int bymax
Definition: mathfunc.h:31
double histogram_check_fitness(pHistogram phist, double *args, double(*cdf)(double p, double *args))
Definition: histogram.c:394
Definition: mathfunc.h:108
double tpdf(double x, int df)
Definition: mathfunc.c:311
double gmean
Definition: mathfunc.h:153
double gammainc(double x, double a)
Definition: mathfunc.c:148
pHistogram histogram_load(char *file)
Definition: histogram.c:28
double normrnd(double mu, double sigma)
Definition: mathfunc.c:426
double fpdf(double x, int df1, int df2)
Definition: mathfunc.c:293
double betapdf(double x, double alpha, double beta)
Definition: mathfunc.c:269
int comp_double(const void *elem1, const void *elem2)
Definition: mathfunc.c:712
double exprnd(double mu)
Definition: mathfunc.c:400
double * x_mean
Definition: mathfunc.h:41
double cmp_two_indep_t_test(double *grp1, int size1, double *grp2, int size2)
Definition: grpcmp.c:28