Mercurial > hg > camir-aes2014
comparison toolboxes/FullBNT-1.0.7/bnt/inference/static/@quickscore_inf_engine/private/nr.h @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e9a9cd732c1e |
---|---|
1 /* CAUTION: This is the ANSI C (only) version of the Numerical Recipes | |
2 utility file nr.h. Do not confuse this file with the same-named | |
3 file nr.h that is supplied in the 'misc' subdirectory. | |
4 *That* file is the one from the book, and contains both ANSI and | |
5 traditional K&R versions, along with #ifdef macros to select the | |
6 correct version. *This* file contains only ANSI C. */ | |
7 | |
8 #ifndef _NR_H_ | |
9 #define _NR_H_ | |
10 | |
11 #ifndef _FCOMPLEX_DECLARE_T_ | |
12 typedef struct FCOMPLEX {float r,i;} fcomplex; | |
13 #define _FCOMPLEX_DECLARE_T_ | |
14 #endif /* _FCOMPLEX_DECLARE_T_ */ | |
15 | |
16 #ifndef _ARITHCODE_DECLARE_T_ | |
17 typedef struct { | |
18 unsigned long *ilob,*iupb,*ncumfq,jdif,nc,minint,nch,ncum,nrad; | |
19 } arithcode; | |
20 #define _ARITHCODE_DECLARE_T_ | |
21 #endif /* _ARITHCODE_DECLARE_T_ */ | |
22 | |
23 #ifndef _HUFFCODE_DECLARE_T_ | |
24 typedef struct { | |
25 unsigned long *icod,*ncod,*left,*right,nch,nodemax; | |
26 } huffcode; | |
27 #define _HUFFCODE_DECLARE_T_ | |
28 #endif /* _HUFFCODE_DECLARE_T_ */ | |
29 | |
30 #include <stdio.h> | |
31 | |
32 void addint(double **uf, double **uc, double **res, int nf); | |
33 void airy(float x, float *ai, float *bi, float *aip, float *bip); | |
34 void amebsa(float **p, float y[], int ndim, float pb[], float *yb, | |
35 float ftol, float (*funk)(float []), int *iter, float temptr); | |
36 void amoeba(float **p, float y[], int ndim, float ftol, | |
37 float (*funk)(float []), int *iter); | |
38 float amotry(float **p, float y[], float psum[], int ndim, | |
39 float (*funk)(float []), int ihi, float fac); | |
40 float amotsa(float **p, float y[], float psum[], int ndim, float pb[], | |
41 float *yb, float (*funk)(float []), int ihi, float *yhi, float fac); | |
42 void anneal(float x[], float y[], int iorder[], int ncity); | |
43 double anorm2(double **a, int n); | |
44 void arcmak(unsigned long nfreq[], unsigned long nchh, unsigned long nradd, | |
45 arithcode *acode); | |
46 void arcode(unsigned long *ich, unsigned char **codep, unsigned long *lcode, | |
47 unsigned long *lcd, int isign, arithcode *acode); | |
48 void arcsum(unsigned long iin[], unsigned long iout[], unsigned long ja, | |
49 int nwk, unsigned long nrad, unsigned long nc); | |
50 void asolve(unsigned long n, double b[], double x[], int itrnsp); | |
51 void atimes(unsigned long n, double x[], double r[], int itrnsp); | |
52 void avevar(float data[], unsigned long n, float *ave, float *var); | |
53 void balanc(float **a, int n); | |
54 void banbks(float **a, unsigned long n, int m1, int m2, float **al, | |
55 unsigned long indx[], float b[]); | |
56 void bandec(float **a, unsigned long n, int m1, int m2, float **al, | |
57 unsigned long indx[], float *d); | |
58 void banmul(float **a, unsigned long n, int m1, int m2, float x[], float b[]); | |
59 void bcucof(float y[], float y1[], float y2[], float y12[], float d1, | |
60 float d2, float **c); | |
61 void bcuint(float y[], float y1[], float y2[], float y12[], | |
62 float x1l, float x1u, float x2l, float x2u, float x1, | |
63 float x2, float *ansy, float *ansy1, float *ansy2); | |
64 void beschb(double x, double *gam1, double *gam2, double *gampl, | |
65 double *gammi); | |
66 float bessi(int n, float x); | |
67 float bessi0(float x); | |
68 float bessi1(float x); | |
69 void bessik(float x, float xnu, float *ri, float *rk, float *rip, | |
70 float *rkp); | |
71 float bessj(int n, float x); | |
72 float bessj0(float x); | |
73 float bessj1(float x); | |
74 void bessjy(float x, float xnu, float *rj, float *ry, float *rjp, | |
75 float *ryp); | |
76 float bessk(int n, float x); | |
77 float bessk0(float x); | |
78 float bessk1(float x); | |
79 float bessy(int n, float x); | |
80 float bessy0(float x); | |
81 float bessy1(float x); | |
82 float beta(float z, float w); | |
83 float betacf(float a, float b, float x); | |
84 float betai(float a, float b, float x); | |
85 float bico(int n, int k); | |
86 void bksub(int ne, int nb, int jf, int k1, int k2, float ***c); | |
87 float bnldev(float pp, int n, long *idum); | |
88 float brent(float ax, float bx, float cx, | |
89 float (*f)(float), float tol, float *xmin); | |
90 float brent_arg(float ax, float bx, float cx, | |
91 float (*f)(float, void*), float tol, float *xmin, void *arg); | |
92 void broydn(float x[], int n, int *check, | |
93 void (*vecfunc)(int, float [], float [])); | |
94 void bsstep(float y[], float dydx[], int nv, float *xx, float htry, | |
95 float eps, float yscal[], float *hdid, float *hnext, | |
96 void (*derivs)(float, float [], float [])); | |
97 void caldat(long julian, int *mm, int *id, int *iyyy); | |
98 void chder(float a, float b, float c[], float cder[], int n); | |
99 float chebev(float a, float b, float c[], int m, float x); | |
100 void chebft(float a, float b, float c[], int n, float (*func)(float)); | |
101 void chebpc(float c[], float d[], int n); | |
102 void chint(float a, float b, float c[], float cint[], int n); | |
103 float chixy(float bang); | |
104 void choldc(float **a, int n, float p[]); | |
105 void cholsl(float **a, int n, float p[], float b[], float x[]); | |
106 void chsone(float bins[], float ebins[], int nbins, int knstrn, | |
107 float *df, float *chsq, float *prob); | |
108 void chstwo(float bins1[], float bins2[], int nbins, int knstrn, | |
109 float *df, float *chsq, float *prob); | |
110 void cisi(float x, float *ci, float *si); | |
111 void cntab1(int **nn, int ni, int nj, float *chisq, | |
112 float *df, float *prob, float *cramrv, float *ccc); | |
113 void cntab2(int **nn, int ni, int nj, float *h, float *hx, float *hy, | |
114 float *hygx, float *hxgy, float *uygx, float *uxgy, float *uxy); | |
115 void convlv(float data[], unsigned long n, float respns[], unsigned long m, | |
116 int isign, float ans[]); | |
117 void copy(double **aout, double **ain, int n); | |
118 void correl(float data1[], float data2[], unsigned long n, float ans[]); | |
119 void cosft(float y[], int n, int isign); | |
120 void cosft1(float y[], int n); | |
121 void cosft2(float y[], int n, int isign); | |
122 void covsrt(float **covar, int ma, int ia[], int mfit); | |
123 void crank(unsigned long n, float w[], float *s); | |
124 void cyclic(float a[], float b[], float c[], float alpha, float beta, | |
125 float r[], float x[], unsigned long n); | |
126 void daub4(float a[], unsigned long n, int isign); | |
127 float dawson(float x); | |
128 float dbrent(float ax, float bx, float cx, | |
129 float (*f)(float), float (*df)(float), float tol, float *xmin); | |
130 void ddpoly(float c[], int nc, float x, float pd[], int nd); | |
131 int decchk(char string[], int n, char *ch); | |
132 void derivs(float x, float y[], float dydx[]); | |
133 float df1dim(float x); | |
134 void dfour1(double data[], unsigned long nn, int isign); | |
135 void dfpmin(float p[], int n, float gtol, int *iter, float *fret, | |
136 float (*func)(float []), void (*dfunc)(float [], float [])); | |
137 float dfridr(float (*func)(float), float x, float h, float *err); | |
138 void dftcor(float w, float delta, float a, float b, float endpts[], | |
139 float *corre, float *corim, float *corfac); | |
140 void dftint(float (*func)(float), float a, float b, float w, | |
141 float *cosint, float *sinint); | |
142 void difeq(int k, int k1, int k2, int jsf, int is1, int isf, | |
143 int indexv[], int ne, float **s, float **y); | |
144 void dlinmin(float p[], float xi[], int n, float *fret, | |
145 float (*func)(float []), void (*dfunc)(float [], float[])); | |
146 double dpythag(double a, double b); | |
147 void drealft(double data[], unsigned long n, int isign); | |
148 void dsprsax(double sa[], unsigned long ija[], double x[], double b[], | |
149 unsigned long n); | |
150 void dsprstx(double sa[], unsigned long ija[], double x[], double b[], | |
151 unsigned long n); | |
152 void dsvbksb(double **u, double w[], double **v, int m, int n, double b[], | |
153 double x[]); | |
154 void dsvdcmp(double **a, int m, int n, double w[], double **v); | |
155 void eclass(int nf[], int n, int lista[], int listb[], int m); | |
156 void eclazz(int nf[], int n, int (*equiv)(int, int)); | |
157 float ei(float x); | |
158 void eigsrt(float d[], float **v, int n); | |
159 float elle(float phi, float ak); | |
160 float ellf(float phi, float ak); | |
161 float ellpi(float phi, float en, float ak); | |
162 void elmhes(float **a, int n); | |
163 float erfcc(float x); | |
164 float erff(float x); | |
165 float erffc(float x); | |
166 void eulsum(float *sum, float term, int jterm, float wksp[]); | |
167 float evlmem(float fdt, float d[], int m, float xms); | |
168 float expdev(long *idum); | |
169 float expint(int n, float x); | |
170 float f1(float x); | |
171 float f1dim(float x); | |
172 float f1dim_arg(float x, void *arg); | |
173 float f2(float y); | |
174 float f3(float z); | |
175 float factln(int n); | |
176 float factrl(int n); | |
177 void fasper(float x[], float y[], unsigned long n, float ofac, float hifac, | |
178 float wk1[], float wk2[], unsigned long nwk, unsigned long *nout, | |
179 unsigned long *jmax, float *prob); | |
180 void fdjac(int n, float x[], float fvec[], float **df, | |
181 void (*vecfunc)(int, float [], float [])); | |
182 void fgauss(float x, float a[], float *y, float dyda[], int na); | |
183 void fill0(double **u, int n); | |
184 void fit(float x[], float y[], int ndata, float sig[], int mwt, | |
185 float *a, float *b, float *siga, float *sigb, float *chi2, float *q); | |
186 void fitexy(float x[], float y[], int ndat, float sigx[], float sigy[], | |
187 float *a, float *b, float *siga, float *sigb, float *chi2, float *q); | |
188 void fixrts(float d[], int m); | |
189 void fleg(float x, float pl[], int nl); | |
190 void flmoon(int n, int nph, long *jd, float *frac); | |
191 float fmin(float x[]); | |
192 void four1(float data[], unsigned long nn, int isign); | |
193 void fourew(FILE *file[5], int *na, int *nb, int *nc, int *nd); | |
194 void fourfs(FILE *file[5], unsigned long nn[], int ndim, int isign); | |
195 void fourn(float data[], unsigned long nn[], int ndim, int isign); | |
196 void fpoly(float x, float p[], int np); | |
197 void fred2(int n, float a, float b, float t[], float f[], float w[], | |
198 float (*g)(float), float (*ak)(float, float)); | |
199 float fredin(float x, int n, float a, float b, float t[], float f[], float w[], | |
200 float (*g)(float), float (*ak)(float, float)); | |
201 void frenel(float x, float *s, float *c); | |
202 void frprmn(float p[], int n, float ftol, int *iter, float *fret, | |
203 float (*func)(float []), void (*dfunc)(float [], float [])); | |
204 void frprmn_arg(float p[], int n, float ftol, int *iter, float *fret, | |
205 float (*func)(float [], void*), void (*dfunc)(float [], float [], void*), void* arg); | |
206 void ftest(float data1[], unsigned long n1, float data2[], unsigned long n2, | |
207 float *f, float *prob); | |
208 float gamdev(int ia, long *idum); | |
209 float gammln(float xx); | |
210 float gammp(float a, float x); | |
211 float gammq(float a, float x); | |
212 float gasdev(long *idum); | |
213 void gaucof(int n, float a[], float b[], float amu0, float x[], float w[]); | |
214 void gauher(float x[], float w[], int n); | |
215 void gaujac(float x[], float w[], int n, float alf, float bet); | |
216 void gaulag(float x[], float w[], int n, float alf); | |
217 void gauleg(float x1, float x2, float x[], float w[], int n); | |
218 void gaussj(float **a, int n, float **b, int m); | |
219 void gcf(float *gammcf, float a, float x, float *gln); | |
220 float golden(float ax, float bx, float cx, float (*f)(float), float tol, | |
221 float *xmin); | |
222 void gser(float *gamser, float a, float x, float *gln); | |
223 void hpsel(unsigned long m, unsigned long n, float arr[], float heap[]); | |
224 void hpsort(unsigned long n, float ra[]); | |
225 void hqr(float **a, int n, float wr[], float wi[]); | |
226 void hufapp(unsigned long index[], unsigned long nprob[], unsigned long n, | |
227 unsigned long i); | |
228 void hufdec(unsigned long *ich, unsigned char *code, unsigned long lcode, | |
229 unsigned long *nb, huffcode *hcode); | |
230 void hufenc(unsigned long ich, unsigned char **codep, unsigned long *lcode, | |
231 unsigned long *nb, huffcode *hcode); | |
232 void hufmak(unsigned long nfreq[], unsigned long nchin, unsigned long *ilong, | |
233 unsigned long *nlong, huffcode *hcode); | |
234 void hunt(float xx[], unsigned long n, float x, unsigned long *jlo); | |
235 void hypdrv(float s, float yy[], float dyyds[]); | |
236 fcomplex hypgeo(fcomplex a, fcomplex b, fcomplex c, fcomplex z); | |
237 void hypser(fcomplex a, fcomplex b, fcomplex c, fcomplex z, | |
238 fcomplex *series, fcomplex *deriv); | |
239 unsigned short icrc(unsigned short crc, unsigned char *bufptr, | |
240 unsigned long len, short jinit, int jrev); | |
241 unsigned short icrc1(unsigned short crc, unsigned char onech); | |
242 unsigned long igray(unsigned long n, int is); | |
243 void iindexx(unsigned long n, long arr[], unsigned long indx[]); | |
244 void indexx(unsigned long n, float arr[], unsigned long indx[]); | |
245 void interp(double **uf, double **uc, int nf); | |
246 int irbit1(unsigned long *iseed); | |
247 int irbit2(unsigned long *iseed); | |
248 void jacobi(float **a, int n, float d[], float **v, int *nrot); | |
249 void jacobn(float x, float y[], float dfdx[], float **dfdy, int n); | |
250 long julday(int mm, int id, int iyyy); | |
251 void kendl1(float data1[], float data2[], unsigned long n, float *tau, float *z, | |
252 float *prob); | |
253 void kendl2(float **tab, int i, int j, float *tau, float *z, float *prob); | |
254 void kermom(double w[], double y, int m); | |
255 void ks2d1s(float x1[], float y1[], unsigned long n1, | |
256 void (*quadvl)(float, float, float *, float *, float *, float *), | |
257 float *d1, float *prob); | |
258 void ks2d2s(float x1[], float y1[], unsigned long n1, float x2[], float y2[], | |
259 unsigned long n2, float *d, float *prob); | |
260 void ksone(float data[], unsigned long n, float (*func)(float), float *d, | |
261 float *prob); | |
262 void kstwo(float data1[], unsigned long n1, float data2[], unsigned long n2, | |
263 float *d, float *prob); | |
264 void laguer(fcomplex a[], int m, fcomplex *x, int *its); | |
265 void lfit(float x[], float y[], float sig[], int ndat, float a[], int ia[], | |
266 int ma, float **covar, float *chisq, void (*funcs)(float, float [], int)); | |
267 void linbcg(unsigned long n, double b[], double x[], int itol, double tol, | |
268 int itmax, int *iter, double *err); | |
269 void linmin(float p[], float xi[], int n, float *fret, | |
270 float (*func)(float [])); | |
271 void linmin_arg(float p[], float xi[], int n, float *fret, | |
272 float (*func)(float [], void*), void *arg); | |
273 void lnsrch(int n, float xold[], float fold, float g[], float p[], float x[], | |
274 float *f, float stpmax, int *check, float (*func)(float [])); | |
275 void load(float x1, float v[], float y[]); | |
276 void load1(float x1, float v1[], float y[]); | |
277 void load2(float x2, float v2[], float y[]); | |
278 void locate(float xx[], unsigned long n, float x, unsigned long *j); | |
279 void lop(double **out, double **u, int n); | |
280 void lubksb(float **a, int n, int *indx, float b[]); | |
281 void ludcmp(float **a, int n, int *indx, float *d); | |
282 void machar(int *ibeta, int *it, int *irnd, int *ngrd, | |
283 int *machep, int *negep, int *iexp, int *minexp, int *maxexp, | |
284 float *eps, float *epsneg, float *xmin, float *xmax); | |
285 void matadd(double **a, double **b, double **c, int n); | |
286 void matsub(double **a, double **b, double **c, int n); | |
287 void medfit(float x[], float y[], int ndata, float *a, float *b, float *abdev); | |
288 void memcof(float data[], int n, int m, float *xms, float d[]); | |
289 int metrop(float de, float t); | |
290 void mgfas(double **u, int n, int maxcyc); | |
291 void mglin(double **u, int n, int ncycle); | |
292 float midexp(float (*funk)(float), float aa, float bb, int n); | |
293 float midinf(float (*funk)(float), float aa, float bb, int n); | |
294 float midpnt(float (*func)(float), float a, float b, int n); | |
295 float midsql(float (*funk)(float), float aa, float bb, int n); | |
296 float midsqu(float (*funk)(float), float aa, float bb, int n); | |
297 void miser(float (*func)(float []), float regn[], int ndim, unsigned long npts, | |
298 float dith, float *ave, float *var); | |
299 void mmid(float y[], float dydx[], int nvar, float xs, float htot, | |
300 int nstep, float yout[], void (*derivs)(float, float[], float[])); | |
301 void mnbrak(float *ax, float *bx, float *cx, float *fa, float *fb, | |
302 float *fc, float (*func)(float)); | |
303 void mnbrak_arg(float *ax, float *bx, float *cx, float *fa, float *fb, | |
304 float *fc, float (*func)(float, void*), void *arg); | |
305 void mnewt(int ntrial, float x[], int n, float tolx, float tolf); | |
306 void moment(float data[], int n, float *ave, float *adev, float *sdev, | |
307 float *var, float *skew, float *curt); | |
308 void mp2dfr(unsigned char a[], unsigned char s[], int n, int *m); | |
309 void mpadd(unsigned char w[], unsigned char u[], unsigned char v[], int n); | |
310 void mpdiv(unsigned char q[], unsigned char r[], unsigned char u[], | |
311 unsigned char v[], int n, int m); | |
312 void mpinv(unsigned char u[], unsigned char v[], int n, int m); | |
313 void mplsh(unsigned char u[], int n); | |
314 void mpmov(unsigned char u[], unsigned char v[], int n); | |
315 void mpmul(unsigned char w[], unsigned char u[], unsigned char v[], int n, | |
316 int m); | |
317 void mpneg(unsigned char u[], int n); | |
318 void mppi(int n); | |
319 void mprove(float **a, float **alud, int n, int indx[], float b[], | |
320 float x[]); | |
321 void mpsad(unsigned char w[], unsigned char u[], int n, int iv); | |
322 void mpsdv(unsigned char w[], unsigned char u[], int n, int iv, int *ir); | |
323 void mpsmu(unsigned char w[], unsigned char u[], int n, int iv); | |
324 void mpsqrt(unsigned char w[], unsigned char u[], unsigned char v[], int n, | |
325 int m); | |
326 void mpsub(int *is, unsigned char w[], unsigned char u[], unsigned char v[], | |
327 int n); | |
328 void mrqcof(float x[], float y[], float sig[], int ndata, float a[], | |
329 int ia[], int ma, float **alpha, float beta[], float *chisq, | |
330 void (*funcs)(float, float [], float *, float [], int)); | |
331 void mrqmin(float x[], float y[], float sig[], int ndata, float a[], | |
332 int ia[], int ma, float **covar, float **alpha, float *chisq, | |
333 void (*funcs)(float, float [], float *, float [], int), float *alamda); | |
334 void newt(float x[], int n, int *check, | |
335 void (*vecfunc)(int, float [], float [])); | |
336 void odeint(float ystart[], int nvar, float x1, float x2, | |
337 float eps, float h1, float hmin, int *nok, int *nbad, | |
338 void (*derivs)(float, float [], float []), | |
339 void (*rkqs)(float [], float [], int, float *, float, float, | |
340 float [], float *, float *, void (*)(float, float [], float []))); | |
341 void orthog(int n, float anu[], float alpha[], float beta[], float a[], | |
342 float b[]); | |
343 void pade(double cof[], int n, float *resid); | |
344 void pccheb(float d[], float c[], int n); | |
345 void pcshft(float a, float b, float d[], int n); | |
346 void pearsn(float x[], float y[], unsigned long n, float *r, float *prob, | |
347 float *z); | |
348 void period(float x[], float y[], int n, float ofac, float hifac, | |
349 float px[], float py[], int np, int *nout, int *jmax, float *prob); | |
350 void piksr2(int n, float arr[], float brr[]); | |
351 void piksrt(int n, float arr[]); | |
352 void pinvs(int ie1, int ie2, int je1, int jsf, int jc1, int k, | |
353 float ***c, float **s); | |
354 float plgndr(int l, int m, float x); | |
355 float poidev(float xm, long *idum); | |
356 void polcoe(float x[], float y[], int n, float cof[]); | |
357 void polcof(float xa[], float ya[], int n, float cof[]); | |
358 void poldiv(float u[], int n, float v[], int nv, float q[], float r[]); | |
359 void polin2(float x1a[], float x2a[], float **ya, int m, int n, | |
360 float x1, float x2, float *y, float *dy); | |
361 void polint(float xa[], float ya[], int n, float x, float *y, float *dy); | |
362 void powell(float p[], float **xi, int n, float ftol, int *iter, float *fret, | |
363 float (*func)(float [])); | |
364 void predic(float data[], int ndata, float d[], int m, float future[], int nfut); | |
365 float probks(float alam); | |
366 void psdes(unsigned long *lword, unsigned long *irword); | |
367 void pwt(float a[], unsigned long n, int isign); | |
368 void pwtset(int n); | |
369 float pythag(float a, float b); | |
370 void pzextr(int iest, float xest, float yest[], float yz[], float dy[], | |
371 int nv); | |
372 float qgaus(float (*func)(float), float a, float b); | |
373 void qrdcmp(float **a, int n, float *c, float *d, int *sing); | |
374 float qromb(float (*func)(float), float a, float b); | |
375 float qromo(float (*func)(float), float a, float b, | |
376 float (*choose)(float (*)(float), float, float, int)); | |
377 void qroot(float p[], int n, float *b, float *c, float eps); | |
378 void qrsolv(float **a, int n, float c[], float d[], float b[]); | |
379 void qrupdt(float **r, float **qt, int n, float u[], float v[]); | |
380 float qsimp(float (*func)(float), float a, float b); | |
381 float qtrap(float (*func)(float), float a, float b); | |
382 float quad3d(float (*func)(float, float, float), float x1, float x2); | |
383 void quadct(float x, float y, float xx[], float yy[], unsigned long nn, | |
384 float *fa, float *fb, float *fc, float *fd); | |
385 void quadmx(float **a, int n); | |
386 void quadvl(float x, float y, float *fa, float *fb, float *fc, float *fd); | |
387 float ran0(long *idum); | |
388 float ran1(long *idum); | |
389 float ran2(long *idum); | |
390 float ran3(long *idum); | |
391 float ran4(long *idum); | |
392 void rank(unsigned long n, unsigned long indx[], unsigned long irank[]); | |
393 void ranpt(float pt[], float regn[], int n); | |
394 void ratint(float xa[], float ya[], int n, float x, float *y, float *dy); | |
395 void ratlsq(double (*fn)(double), double a, double b, int mm, int kk, | |
396 double cof[], double *dev); | |
397 double ratval(double x, double cof[], int mm, int kk); | |
398 float rc(float x, float y); | |
399 float rd(float x, float y, float z); | |
400 void realft(float data[], unsigned long n, int isign); | |
401 void rebin(float rc, int nd, float r[], float xin[], float xi[]); | |
402 void red(int iz1, int iz2, int jz1, int jz2, int jm1, int jm2, int jmf, | |
403 int ic1, int jc1, int jcf, int kc, float ***c, float **s); | |
404 void relax(double **u, double **rhs, int n); | |
405 void relax2(double **u, double **rhs, int n); | |
406 void resid(double **res, double **u, double **rhs, int n); | |
407 float revcst(float x[], float y[], int iorder[], int ncity, int n[]); | |
408 void reverse(int iorder[], int ncity, int n[]); | |
409 float rf(float x, float y, float z); | |
410 float rj(float x, float y, float z, float p); | |
411 void rk4(float y[], float dydx[], int n, float x, float h, float yout[], | |
412 void (*derivs)(float, float [], float [])); | |
413 void rkck(float y[], float dydx[], int n, float x, float h, | |
414 float yout[], float yerr[], void (*derivs)(float, float [], float [])); | |
415 void rkdumb(float vstart[], int nvar, float x1, float x2, int nstep, | |
416 void (*derivs)(float, float [], float [])); | |
417 void rkqs(float y[], float dydx[], int n, float *x, | |
418 float htry, float eps, float yscal[], float *hdid, float *hnext, | |
419 void (*derivs)(float, float [], float [])); | |
420 void rlft3(float ***data, float **speq, unsigned long nn1, | |
421 unsigned long nn2, unsigned long nn3, int isign); | |
422 float rofunc(float b); | |
423 void rotate(float **r, float **qt, int n, int i, float a, float b); | |
424 void rsolv(float **a, int n, float d[], float b[]); | |
425 void rstrct(double **uc, double **uf, int nc); | |
426 float rtbis(float (*func)(float), float x1, float x2, float xacc); | |
427 float rtflsp(float (*func)(float), float x1, float x2, float xacc); | |
428 float rtnewt(void (*funcd)(float, float *, float *), float x1, float x2, | |
429 float xacc); | |
430 float rtsafe(void (*funcd)(float, float *, float *), float x1, float x2, | |
431 float xacc); | |
432 float rtsec(float (*func)(float), float x1, float x2, float xacc); | |
433 void rzextr(int iest, float xest, float yest[], float yz[], float dy[], int nv); | |
434 void savgol(float c[], int np, int nl, int nr, int ld, int m); | |
435 void score(float xf, float y[], float f[]); | |
436 void scrsho(float (*fx)(float)); | |
437 float select(unsigned long k, unsigned long n, float arr[]); | |
438 float selip(unsigned long k, unsigned long n, float arr[]); | |
439 void shell(unsigned long n, float a[]); | |
440 void shoot(int n, float v[], float f[]); | |
441 void shootf(int n, float v[], float f[]); | |
442 void simp1(float **a, int mm, int ll[], int nll, int iabf, int *kp, | |
443 float *bmax); | |
444 void simp2(float **a, int n, int l2[], int nl2, int *ip, int kp, float *q1); | |
445 void simp3(float **a, int i1, int k1, int ip, int kp); | |
446 void simplx(float **a, int m, int n, int m1, int m2, int m3, int *icase, | |
447 int izrov[], int iposv[]); | |
448 void simpr(float y[], float dydx[], float dfdx[], float **dfdy, | |
449 int n, float xs, float htot, int nstep, float yout[], | |
450 void (*derivs)(float, float [], float [])); | |
451 void sinft(float y[], int n); | |
452 void slvsm2(double **u, double **rhs); | |
453 void slvsml(double **u, double **rhs); | |
454 void sncndn(float uu, float emmc, float *sn, float *cn, float *dn); | |
455 double snrm(unsigned long n, double sx[], int itol); | |
456 void sobseq(int *n, float x[]); | |
457 void solvde(int itmax, float conv, float slowc, float scalv[], | |
458 int indexv[], int ne, int nb, int m, float **y, float ***c, float **s); | |
459 void sor(double **a, double **b, double **c, double **d, double **e, | |
460 double **f, double **u, int jmax, double rjac); | |
461 void sort(unsigned long n, float arr[]); | |
462 void sort2(unsigned long n, float arr[], float brr[]); | |
463 void sort3(unsigned long n, float ra[], float rb[], float rc[]); | |
464 void spctrm(FILE *fp, float p[], int m, int k, int ovrlap); | |
465 void spear(float data1[], float data2[], unsigned long n, float *d, float *zd, | |
466 float *probd, float *rs, float *probrs); | |
467 void sphbes(int n, float x, float *sj, float *sy, float *sjp, float *syp); | |
468 void splie2(float x1a[], float x2a[], float **ya, int m, int n, float **y2a); | |
469 void splin2(float x1a[], float x2a[], float **ya, float **y2a, int m, int n, | |
470 float x1, float x2, float *y); | |
471 void spline(float x[], float y[], int n, float yp1, float ypn, float y2[]); | |
472 void splint(float xa[], float ya[], float y2a[], int n, float x, float *y); | |
473 void spread(float y, float yy[], unsigned long n, float x, int m); | |
474 void sprsax(float sa[], unsigned long ija[], float x[], float b[], | |
475 unsigned long n); | |
476 void sprsin(float **a, int n, float thresh, unsigned long nmax, float sa[], | |
477 unsigned long ija[]); | |
478 void sprspm(float sa[], unsigned long ija[], float sb[], unsigned long ijb[], | |
479 float sc[], unsigned long ijc[]); | |
480 void sprstm(float sa[], unsigned long ija[], float sb[], unsigned long ijb[], | |
481 float thresh, unsigned long nmax, float sc[], unsigned long ijc[]); | |
482 void sprstp(float sa[], unsigned long ija[], float sb[], unsigned long ijb[]); | |
483 void sprstx(float sa[], unsigned long ija[], float x[], float b[], | |
484 unsigned long n); | |
485 void stifbs(float y[], float dydx[], int nv, float *xx, | |
486 float htry, float eps, float yscal[], float *hdid, float *hnext, | |
487 void (*derivs)(float, float [], float [])); | |
488 void stiff(float y[], float dydx[], int n, float *x, | |
489 float htry, float eps, float yscal[], float *hdid, float *hnext, | |
490 void (*derivs)(float, float [], float [])); | |
491 void stoerm(float y[], float d2y[], int nv, float xs, | |
492 float htot, int nstep, float yout[], | |
493 void (*derivs)(float, float [], float [])); | |
494 void svbksb(float **u, float w[], float **v, int m, int n, float b[], | |
495 float x[]); | |
496 void svdcmp(float **a, int m, int n, float w[], float **v); | |
497 void svdfit(float x[], float y[], float sig[], int ndata, float a[], | |
498 int ma, float **u, float **v, float w[], float *chisq, | |
499 void (*funcs)(float, float [], int)); | |
500 void svdvar(float **v, int ma, float w[], float **cvm); | |
501 void toeplz(float r[], float x[], float y[], int n); | |
502 void tptest(float data1[], float data2[], unsigned long n, float *t, float *prob); | |
503 void tqli(float d[], float e[], int n, float **z); | |
504 float trapzd(float (*func)(float), float a, float b, int n); | |
505 void tred2(float **a, int n, float d[], float e[]); | |
506 void tridag(float a[], float b[], float c[], float r[], float u[], | |
507 unsigned long n); | |
508 float trncst(float x[], float y[], int iorder[], int ncity, int n[]); | |
509 void trnspt(int iorder[], int ncity, int n[]); | |
510 void ttest(float data1[], unsigned long n1, float data2[], unsigned long n2, | |
511 float *t, float *prob); | |
512 void tutest(float data1[], unsigned long n1, float data2[], unsigned long n2, | |
513 float *t, float *prob); | |
514 void twofft(float data1[], float data2[], float fft1[], float fft2[], | |
515 unsigned long n); | |
516 void vander(double x[], double w[], double q[], int n); | |
517 void vegas(float regn[], int ndim, float (*fxn)(float [], float), int init, | |
518 unsigned long ncall, int itmx, int nprn, float *tgral, float *sd, | |
519 float *chi2a); | |
520 void voltra(int n, int m, float t0, float h, float *t, float **f, | |
521 float (*g)(int, float), float (*ak)(int, int, float, float)); | |
522 void wt1(float a[], unsigned long n, int isign, | |
523 void (*wtstep)(float [], unsigned long, int)); | |
524 void wtn(float a[], unsigned long nn[], int ndim, int isign, | |
525 void (*wtstep)(float [], unsigned long, int)); | |
526 void wwghts(float wghts[], int n, float h, | |
527 void (*kermom)(double [], double ,int)); | |
528 int zbrac(float (*func)(float), float *x1, float *x2); | |
529 void zbrak(float (*fx)(float), float x1, float x2, int n, float xb1[], | |
530 float xb2[], int *nb); | |
531 float zbrent(float (*func)(float), float x1, float x2, float tol); | |
532 void zrhqr(float a[], int m, float rtr[], float rti[]); | |
533 float zriddr(float (*func)(float), float x1, float x2, float xacc); | |
534 void zroots(fcomplex a[], int m, fcomplex roots[], int polish); | |
535 | |
536 #endif /* _NR_H_ */ |