wolffd@0: /* CAUTION: This is the ANSI C (only) version of the Numerical Recipes wolffd@0: utility file nr.h. Do not confuse this file with the same-named wolffd@0: file nr.h that is supplied in the 'misc' subdirectory. wolffd@0: *That* file is the one from the book, and contains both ANSI and wolffd@0: traditional K&R versions, along with #ifdef macros to select the wolffd@0: correct version. *This* file contains only ANSI C. */ wolffd@0: wolffd@0: #ifndef _NR_H_ wolffd@0: #define _NR_H_ wolffd@0: wolffd@0: #ifndef _FCOMPLEX_DECLARE_T_ wolffd@0: typedef struct FCOMPLEX {float r,i;} fcomplex; wolffd@0: #define _FCOMPLEX_DECLARE_T_ wolffd@0: #endif /* _FCOMPLEX_DECLARE_T_ */ wolffd@0: wolffd@0: #ifndef _ARITHCODE_DECLARE_T_ wolffd@0: typedef struct { wolffd@0: unsigned long *ilob,*iupb,*ncumfq,jdif,nc,minint,nch,ncum,nrad; wolffd@0: } arithcode; wolffd@0: #define _ARITHCODE_DECLARE_T_ wolffd@0: #endif /* _ARITHCODE_DECLARE_T_ */ wolffd@0: wolffd@0: #ifndef _HUFFCODE_DECLARE_T_ wolffd@0: typedef struct { wolffd@0: unsigned long *icod,*ncod,*left,*right,nch,nodemax; wolffd@0: } huffcode; wolffd@0: #define _HUFFCODE_DECLARE_T_ wolffd@0: #endif /* _HUFFCODE_DECLARE_T_ */ wolffd@0: wolffd@0: #include wolffd@0: wolffd@0: void addint(double **uf, double **uc, double **res, int nf); wolffd@0: void airy(float x, float *ai, float *bi, float *aip, float *bip); wolffd@0: void amebsa(float **p, float y[], int ndim, float pb[], float *yb, wolffd@0: float ftol, float (*funk)(float []), int *iter, float temptr); wolffd@0: void amoeba(float **p, float y[], int ndim, float ftol, wolffd@0: float (*funk)(float []), int *iter); wolffd@0: float amotry(float **p, float y[], float psum[], int ndim, wolffd@0: float (*funk)(float []), int ihi, float fac); wolffd@0: float amotsa(float **p, float y[], float psum[], int ndim, float pb[], wolffd@0: float *yb, float (*funk)(float []), int ihi, float *yhi, float fac); wolffd@0: void anneal(float x[], float y[], int iorder[], int ncity); wolffd@0: double anorm2(double **a, int n); wolffd@0: void arcmak(unsigned long nfreq[], unsigned long nchh, unsigned long nradd, wolffd@0: arithcode *acode); wolffd@0: void arcode(unsigned long *ich, unsigned char **codep, unsigned long *lcode, wolffd@0: unsigned long *lcd, int isign, arithcode *acode); wolffd@0: void arcsum(unsigned long iin[], unsigned long iout[], unsigned long ja, wolffd@0: int nwk, unsigned long nrad, unsigned long nc); wolffd@0: void asolve(unsigned long n, double b[], double x[], int itrnsp); wolffd@0: void atimes(unsigned long n, double x[], double r[], int itrnsp); wolffd@0: void avevar(float data[], unsigned long n, float *ave, float *var); wolffd@0: void balanc(float **a, int n); wolffd@0: void banbks(float **a, unsigned long n, int m1, int m2, float **al, wolffd@0: unsigned long indx[], float b[]); wolffd@0: void bandec(float **a, unsigned long n, int m1, int m2, float **al, wolffd@0: unsigned long indx[], float *d); wolffd@0: void banmul(float **a, unsigned long n, int m1, int m2, float x[], float b[]); wolffd@0: void bcucof(float y[], float y1[], float y2[], float y12[], float d1, wolffd@0: float d2, float **c); wolffd@0: void bcuint(float y[], float y1[], float y2[], float y12[], wolffd@0: float x1l, float x1u, float x2l, float x2u, float x1, wolffd@0: float x2, float *ansy, float *ansy1, float *ansy2); wolffd@0: void beschb(double x, double *gam1, double *gam2, double *gampl, wolffd@0: double *gammi); wolffd@0: float bessi(int n, float x); wolffd@0: float bessi0(float x); wolffd@0: float bessi1(float x); wolffd@0: void bessik(float x, float xnu, float *ri, float *rk, float *rip, wolffd@0: float *rkp); wolffd@0: float bessj(int n, float x); wolffd@0: float bessj0(float x); wolffd@0: float bessj1(float x); wolffd@0: void bessjy(float x, float xnu, float *rj, float *ry, float *rjp, wolffd@0: float *ryp); wolffd@0: float bessk(int n, float x); wolffd@0: float bessk0(float x); wolffd@0: float bessk1(float x); wolffd@0: float bessy(int n, float x); wolffd@0: float bessy0(float x); wolffd@0: float bessy1(float x); wolffd@0: float beta(float z, float w); wolffd@0: float betacf(float a, float b, float x); wolffd@0: float betai(float a, float b, float x); wolffd@0: float bico(int n, int k); wolffd@0: void bksub(int ne, int nb, int jf, int k1, int k2, float ***c); wolffd@0: float bnldev(float pp, int n, long *idum); wolffd@0: float brent(float ax, float bx, float cx, wolffd@0: float (*f)(float), float tol, float *xmin); wolffd@0: float brent_arg(float ax, float bx, float cx, wolffd@0: float (*f)(float, void*), float tol, float *xmin, void *arg); wolffd@0: void broydn(float x[], int n, int *check, wolffd@0: void (*vecfunc)(int, float [], float [])); wolffd@0: void bsstep(float y[], float dydx[], int nv, float *xx, float htry, wolffd@0: float eps, float yscal[], float *hdid, float *hnext, wolffd@0: void (*derivs)(float, float [], float [])); wolffd@0: void caldat(long julian, int *mm, int *id, int *iyyy); wolffd@0: void chder(float a, float b, float c[], float cder[], int n); wolffd@0: float chebev(float a, float b, float c[], int m, float x); wolffd@0: void chebft(float a, float b, float c[], int n, float (*func)(float)); wolffd@0: void chebpc(float c[], float d[], int n); wolffd@0: void chint(float a, float b, float c[], float cint[], int n); wolffd@0: float chixy(float bang); wolffd@0: void choldc(float **a, int n, float p[]); wolffd@0: void cholsl(float **a, int n, float p[], float b[], float x[]); wolffd@0: void chsone(float bins[], float ebins[], int nbins, int knstrn, wolffd@0: float *df, float *chsq, float *prob); wolffd@0: void chstwo(float bins1[], float bins2[], int nbins, int knstrn, wolffd@0: float *df, float *chsq, float *prob); wolffd@0: void cisi(float x, float *ci, float *si); wolffd@0: void cntab1(int **nn, int ni, int nj, float *chisq, wolffd@0: float *df, float *prob, float *cramrv, float *ccc); wolffd@0: void cntab2(int **nn, int ni, int nj, float *h, float *hx, float *hy, wolffd@0: float *hygx, float *hxgy, float *uygx, float *uxgy, float *uxy); wolffd@0: void convlv(float data[], unsigned long n, float respns[], unsigned long m, wolffd@0: int isign, float ans[]); wolffd@0: void copy(double **aout, double **ain, int n); wolffd@0: void correl(float data1[], float data2[], unsigned long n, float ans[]); wolffd@0: void cosft(float y[], int n, int isign); wolffd@0: void cosft1(float y[], int n); wolffd@0: void cosft2(float y[], int n, int isign); wolffd@0: void covsrt(float **covar, int ma, int ia[], int mfit); wolffd@0: void crank(unsigned long n, float w[], float *s); wolffd@0: void cyclic(float a[], float b[], float c[], float alpha, float beta, wolffd@0: float r[], float x[], unsigned long n); wolffd@0: void daub4(float a[], unsigned long n, int isign); wolffd@0: float dawson(float x); wolffd@0: float dbrent(float ax, float bx, float cx, wolffd@0: float (*f)(float), float (*df)(float), float tol, float *xmin); wolffd@0: void ddpoly(float c[], int nc, float x, float pd[], int nd); wolffd@0: int decchk(char string[], int n, char *ch); wolffd@0: void derivs(float x, float y[], float dydx[]); wolffd@0: float df1dim(float x); wolffd@0: void dfour1(double data[], unsigned long nn, int isign); wolffd@0: void dfpmin(float p[], int n, float gtol, int *iter, float *fret, wolffd@0: float (*func)(float []), void (*dfunc)(float [], float [])); wolffd@0: float dfridr(float (*func)(float), float x, float h, float *err); wolffd@0: void dftcor(float w, float delta, float a, float b, float endpts[], wolffd@0: float *corre, float *corim, float *corfac); wolffd@0: void dftint(float (*func)(float), float a, float b, float w, wolffd@0: float *cosint, float *sinint); wolffd@0: void difeq(int k, int k1, int k2, int jsf, int is1, int isf, wolffd@0: int indexv[], int ne, float **s, float **y); wolffd@0: void dlinmin(float p[], float xi[], int n, float *fret, wolffd@0: float (*func)(float []), void (*dfunc)(float [], float[])); wolffd@0: double dpythag(double a, double b); wolffd@0: void drealft(double data[], unsigned long n, int isign); wolffd@0: void dsprsax(double sa[], unsigned long ija[], double x[], double b[], wolffd@0: unsigned long n); wolffd@0: void dsprstx(double sa[], unsigned long ija[], double x[], double b[], wolffd@0: unsigned long n); wolffd@0: void dsvbksb(double **u, double w[], double **v, int m, int n, double b[], wolffd@0: double x[]); wolffd@0: void dsvdcmp(double **a, int m, int n, double w[], double **v); wolffd@0: void eclass(int nf[], int n, int lista[], int listb[], int m); wolffd@0: void eclazz(int nf[], int n, int (*equiv)(int, int)); wolffd@0: float ei(float x); wolffd@0: void eigsrt(float d[], float **v, int n); wolffd@0: float elle(float phi, float ak); wolffd@0: float ellf(float phi, float ak); wolffd@0: float ellpi(float phi, float en, float ak); wolffd@0: void elmhes(float **a, int n); wolffd@0: float erfcc(float x); wolffd@0: float erff(float x); wolffd@0: float erffc(float x); wolffd@0: void eulsum(float *sum, float term, int jterm, float wksp[]); wolffd@0: float evlmem(float fdt, float d[], int m, float xms); wolffd@0: float expdev(long *idum); wolffd@0: float expint(int n, float x); wolffd@0: float f1(float x); wolffd@0: float f1dim(float x); wolffd@0: float f1dim_arg(float x, void *arg); wolffd@0: float f2(float y); wolffd@0: float f3(float z); wolffd@0: float factln(int n); wolffd@0: float factrl(int n); wolffd@0: void fasper(float x[], float y[], unsigned long n, float ofac, float hifac, wolffd@0: float wk1[], float wk2[], unsigned long nwk, unsigned long *nout, wolffd@0: unsigned long *jmax, float *prob); wolffd@0: void fdjac(int n, float x[], float fvec[], float **df, wolffd@0: void (*vecfunc)(int, float [], float [])); wolffd@0: void fgauss(float x, float a[], float *y, float dyda[], int na); wolffd@0: void fill0(double **u, int n); wolffd@0: void fit(float x[], float y[], int ndata, float sig[], int mwt, wolffd@0: float *a, float *b, float *siga, float *sigb, float *chi2, float *q); wolffd@0: void fitexy(float x[], float y[], int ndat, float sigx[], float sigy[], wolffd@0: float *a, float *b, float *siga, float *sigb, float *chi2, float *q); wolffd@0: void fixrts(float d[], int m); wolffd@0: void fleg(float x, float pl[], int nl); wolffd@0: void flmoon(int n, int nph, long *jd, float *frac); wolffd@0: float fmin(float x[]); wolffd@0: void four1(float data[], unsigned long nn, int isign); wolffd@0: void fourew(FILE *file[5], int *na, int *nb, int *nc, int *nd); wolffd@0: void fourfs(FILE *file[5], unsigned long nn[], int ndim, int isign); wolffd@0: void fourn(float data[], unsigned long nn[], int ndim, int isign); wolffd@0: void fpoly(float x, float p[], int np); wolffd@0: void fred2(int n, float a, float b, float t[], float f[], float w[], wolffd@0: float (*g)(float), float (*ak)(float, float)); wolffd@0: float fredin(float x, int n, float a, float b, float t[], float f[], float w[], wolffd@0: float (*g)(float), float (*ak)(float, float)); wolffd@0: void frenel(float x, float *s, float *c); wolffd@0: void frprmn(float p[], int n, float ftol, int *iter, float *fret, wolffd@0: float (*func)(float []), void (*dfunc)(float [], float [])); wolffd@0: void frprmn_arg(float p[], int n, float ftol, int *iter, float *fret, wolffd@0: float (*func)(float [], void*), void (*dfunc)(float [], float [], void*), void* arg); wolffd@0: void ftest(float data1[], unsigned long n1, float data2[], unsigned long n2, wolffd@0: float *f, float *prob); wolffd@0: float gamdev(int ia, long *idum); wolffd@0: float gammln(float xx); wolffd@0: float gammp(float a, float x); wolffd@0: float gammq(float a, float x); wolffd@0: float gasdev(long *idum); wolffd@0: void gaucof(int n, float a[], float b[], float amu0, float x[], float w[]); wolffd@0: void gauher(float x[], float w[], int n); wolffd@0: void gaujac(float x[], float w[], int n, float alf, float bet); wolffd@0: void gaulag(float x[], float w[], int n, float alf); wolffd@0: void gauleg(float x1, float x2, float x[], float w[], int n); wolffd@0: void gaussj(float **a, int n, float **b, int m); wolffd@0: void gcf(float *gammcf, float a, float x, float *gln); wolffd@0: float golden(float ax, float bx, float cx, float (*f)(float), float tol, wolffd@0: float *xmin); wolffd@0: void gser(float *gamser, float a, float x, float *gln); wolffd@0: void hpsel(unsigned long m, unsigned long n, float arr[], float heap[]); wolffd@0: void hpsort(unsigned long n, float ra[]); wolffd@0: void hqr(float **a, int n, float wr[], float wi[]); wolffd@0: void hufapp(unsigned long index[], unsigned long nprob[], unsigned long n, wolffd@0: unsigned long i); wolffd@0: void hufdec(unsigned long *ich, unsigned char *code, unsigned long lcode, wolffd@0: unsigned long *nb, huffcode *hcode); wolffd@0: void hufenc(unsigned long ich, unsigned char **codep, unsigned long *lcode, wolffd@0: unsigned long *nb, huffcode *hcode); wolffd@0: void hufmak(unsigned long nfreq[], unsigned long nchin, unsigned long *ilong, wolffd@0: unsigned long *nlong, huffcode *hcode); wolffd@0: void hunt(float xx[], unsigned long n, float x, unsigned long *jlo); wolffd@0: void hypdrv(float s, float yy[], float dyyds[]); wolffd@0: fcomplex hypgeo(fcomplex a, fcomplex b, fcomplex c, fcomplex z); wolffd@0: void hypser(fcomplex a, fcomplex b, fcomplex c, fcomplex z, wolffd@0: fcomplex *series, fcomplex *deriv); wolffd@0: unsigned short icrc(unsigned short crc, unsigned char *bufptr, wolffd@0: unsigned long len, short jinit, int jrev); wolffd@0: unsigned short icrc1(unsigned short crc, unsigned char onech); wolffd@0: unsigned long igray(unsigned long n, int is); wolffd@0: void iindexx(unsigned long n, long arr[], unsigned long indx[]); wolffd@0: void indexx(unsigned long n, float arr[], unsigned long indx[]); wolffd@0: void interp(double **uf, double **uc, int nf); wolffd@0: int irbit1(unsigned long *iseed); wolffd@0: int irbit2(unsigned long *iseed); wolffd@0: void jacobi(float **a, int n, float d[], float **v, int *nrot); wolffd@0: void jacobn(float x, float y[], float dfdx[], float **dfdy, int n); wolffd@0: long julday(int mm, int id, int iyyy); wolffd@0: void kendl1(float data1[], float data2[], unsigned long n, float *tau, float *z, wolffd@0: float *prob); wolffd@0: void kendl2(float **tab, int i, int j, float *tau, float *z, float *prob); wolffd@0: void kermom(double w[], double y, int m); wolffd@0: void ks2d1s(float x1[], float y1[], unsigned long n1, wolffd@0: void (*quadvl)(float, float, float *, float *, float *, float *), wolffd@0: float *d1, float *prob); wolffd@0: void ks2d2s(float x1[], float y1[], unsigned long n1, float x2[], float y2[], wolffd@0: unsigned long n2, float *d, float *prob); wolffd@0: void ksone(float data[], unsigned long n, float (*func)(float), float *d, wolffd@0: float *prob); wolffd@0: void kstwo(float data1[], unsigned long n1, float data2[], unsigned long n2, wolffd@0: float *d, float *prob); wolffd@0: void laguer(fcomplex a[], int m, fcomplex *x, int *its); wolffd@0: void lfit(float x[], float y[], float sig[], int ndat, float a[], int ia[], wolffd@0: int ma, float **covar, float *chisq, void (*funcs)(float, float [], int)); wolffd@0: void linbcg(unsigned long n, double b[], double x[], int itol, double tol, wolffd@0: int itmax, int *iter, double *err); wolffd@0: void linmin(float p[], float xi[], int n, float *fret, wolffd@0: float (*func)(float [])); wolffd@0: void linmin_arg(float p[], float xi[], int n, float *fret, wolffd@0: float (*func)(float [], void*), void *arg); wolffd@0: void lnsrch(int n, float xold[], float fold, float g[], float p[], float x[], wolffd@0: float *f, float stpmax, int *check, float (*func)(float [])); wolffd@0: void load(float x1, float v[], float y[]); wolffd@0: void load1(float x1, float v1[], float y[]); wolffd@0: void load2(float x2, float v2[], float y[]); wolffd@0: void locate(float xx[], unsigned long n, float x, unsigned long *j); wolffd@0: void lop(double **out, double **u, int n); wolffd@0: void lubksb(float **a, int n, int *indx, float b[]); wolffd@0: void ludcmp(float **a, int n, int *indx, float *d); wolffd@0: void machar(int *ibeta, int *it, int *irnd, int *ngrd, wolffd@0: int *machep, int *negep, int *iexp, int *minexp, int *maxexp, wolffd@0: float *eps, float *epsneg, float *xmin, float *xmax); wolffd@0: void matadd(double **a, double **b, double **c, int n); wolffd@0: void matsub(double **a, double **b, double **c, int n); wolffd@0: void medfit(float x[], float y[], int ndata, float *a, float *b, float *abdev); wolffd@0: void memcof(float data[], int n, int m, float *xms, float d[]); wolffd@0: int metrop(float de, float t); wolffd@0: void mgfas(double **u, int n, int maxcyc); wolffd@0: void mglin(double **u, int n, int ncycle); wolffd@0: float midexp(float (*funk)(float), float aa, float bb, int n); wolffd@0: float midinf(float (*funk)(float), float aa, float bb, int n); wolffd@0: float midpnt(float (*func)(float), float a, float b, int n); wolffd@0: float midsql(float (*funk)(float), float aa, float bb, int n); wolffd@0: float midsqu(float (*funk)(float), float aa, float bb, int n); wolffd@0: void miser(float (*func)(float []), float regn[], int ndim, unsigned long npts, wolffd@0: float dith, float *ave, float *var); wolffd@0: void mmid(float y[], float dydx[], int nvar, float xs, float htot, wolffd@0: int nstep, float yout[], void (*derivs)(float, float[], float[])); wolffd@0: void mnbrak(float *ax, float *bx, float *cx, float *fa, float *fb, wolffd@0: float *fc, float (*func)(float)); wolffd@0: void mnbrak_arg(float *ax, float *bx, float *cx, float *fa, float *fb, wolffd@0: float *fc, float (*func)(float, void*), void *arg); wolffd@0: void mnewt(int ntrial, float x[], int n, float tolx, float tolf); wolffd@0: void moment(float data[], int n, float *ave, float *adev, float *sdev, wolffd@0: float *var, float *skew, float *curt); wolffd@0: void mp2dfr(unsigned char a[], unsigned char s[], int n, int *m); wolffd@0: void mpadd(unsigned char w[], unsigned char u[], unsigned char v[], int n); wolffd@0: void mpdiv(unsigned char q[], unsigned char r[], unsigned char u[], wolffd@0: unsigned char v[], int n, int m); wolffd@0: void mpinv(unsigned char u[], unsigned char v[], int n, int m); wolffd@0: void mplsh(unsigned char u[], int n); wolffd@0: void mpmov(unsigned char u[], unsigned char v[], int n); wolffd@0: void mpmul(unsigned char w[], unsigned char u[], unsigned char v[], int n, wolffd@0: int m); wolffd@0: void mpneg(unsigned char u[], int n); wolffd@0: void mppi(int n); wolffd@0: void mprove(float **a, float **alud, int n, int indx[], float b[], wolffd@0: float x[]); wolffd@0: void mpsad(unsigned char w[], unsigned char u[], int n, int iv); wolffd@0: void mpsdv(unsigned char w[], unsigned char u[], int n, int iv, int *ir); wolffd@0: void mpsmu(unsigned char w[], unsigned char u[], int n, int iv); wolffd@0: void mpsqrt(unsigned char w[], unsigned char u[], unsigned char v[], int n, wolffd@0: int m); wolffd@0: void mpsub(int *is, unsigned char w[], unsigned char u[], unsigned char v[], wolffd@0: int n); wolffd@0: void mrqcof(float x[], float y[], float sig[], int ndata, float a[], wolffd@0: int ia[], int ma, float **alpha, float beta[], float *chisq, wolffd@0: void (*funcs)(float, float [], float *, float [], int)); wolffd@0: void mrqmin(float x[], float y[], float sig[], int ndata, float a[], wolffd@0: int ia[], int ma, float **covar, float **alpha, float *chisq, wolffd@0: void (*funcs)(float, float [], float *, float [], int), float *alamda); wolffd@0: void newt(float x[], int n, int *check, wolffd@0: void (*vecfunc)(int, float [], float [])); wolffd@0: void odeint(float ystart[], int nvar, float x1, float x2, wolffd@0: float eps, float h1, float hmin, int *nok, int *nbad, wolffd@0: void (*derivs)(float, float [], float []), wolffd@0: void (*rkqs)(float [], float [], int, float *, float, float, wolffd@0: float [], float *, float *, void (*)(float, float [], float []))); wolffd@0: void orthog(int n, float anu[], float alpha[], float beta[], float a[], wolffd@0: float b[]); wolffd@0: void pade(double cof[], int n, float *resid); wolffd@0: void pccheb(float d[], float c[], int n); wolffd@0: void pcshft(float a, float b, float d[], int n); wolffd@0: void pearsn(float x[], float y[], unsigned long n, float *r, float *prob, wolffd@0: float *z); wolffd@0: void period(float x[], float y[], int n, float ofac, float hifac, wolffd@0: float px[], float py[], int np, int *nout, int *jmax, float *prob); wolffd@0: void piksr2(int n, float arr[], float brr[]); wolffd@0: void piksrt(int n, float arr[]); wolffd@0: void pinvs(int ie1, int ie2, int je1, int jsf, int jc1, int k, wolffd@0: float ***c, float **s); wolffd@0: float plgndr(int l, int m, float x); wolffd@0: float poidev(float xm, long *idum); wolffd@0: void polcoe(float x[], float y[], int n, float cof[]); wolffd@0: void polcof(float xa[], float ya[], int n, float cof[]); wolffd@0: void poldiv(float u[], int n, float v[], int nv, float q[], float r[]); wolffd@0: void polin2(float x1a[], float x2a[], float **ya, int m, int n, wolffd@0: float x1, float x2, float *y, float *dy); wolffd@0: void polint(float xa[], float ya[], int n, float x, float *y, float *dy); wolffd@0: void powell(float p[], float **xi, int n, float ftol, int *iter, float *fret, wolffd@0: float (*func)(float [])); wolffd@0: void predic(float data[], int ndata, float d[], int m, float future[], int nfut); wolffd@0: float probks(float alam); wolffd@0: void psdes(unsigned long *lword, unsigned long *irword); wolffd@0: void pwt(float a[], unsigned long n, int isign); wolffd@0: void pwtset(int n); wolffd@0: float pythag(float a, float b); wolffd@0: void pzextr(int iest, float xest, float yest[], float yz[], float dy[], wolffd@0: int nv); wolffd@0: float qgaus(float (*func)(float), float a, float b); wolffd@0: void qrdcmp(float **a, int n, float *c, float *d, int *sing); wolffd@0: float qromb(float (*func)(float), float a, float b); wolffd@0: float qromo(float (*func)(float), float a, float b, wolffd@0: float (*choose)(float (*)(float), float, float, int)); wolffd@0: void qroot(float p[], int n, float *b, float *c, float eps); wolffd@0: void qrsolv(float **a, int n, float c[], float d[], float b[]); wolffd@0: void qrupdt(float **r, float **qt, int n, float u[], float v[]); wolffd@0: float qsimp(float (*func)(float), float a, float b); wolffd@0: float qtrap(float (*func)(float), float a, float b); wolffd@0: float quad3d(float (*func)(float, float, float), float x1, float x2); wolffd@0: void quadct(float x, float y, float xx[], float yy[], unsigned long nn, wolffd@0: float *fa, float *fb, float *fc, float *fd); wolffd@0: void quadmx(float **a, int n); wolffd@0: void quadvl(float x, float y, float *fa, float *fb, float *fc, float *fd); wolffd@0: float ran0(long *idum); wolffd@0: float ran1(long *idum); wolffd@0: float ran2(long *idum); wolffd@0: float ran3(long *idum); wolffd@0: float ran4(long *idum); wolffd@0: void rank(unsigned long n, unsigned long indx[], unsigned long irank[]); wolffd@0: void ranpt(float pt[], float regn[], int n); wolffd@0: void ratint(float xa[], float ya[], int n, float x, float *y, float *dy); wolffd@0: void ratlsq(double (*fn)(double), double a, double b, int mm, int kk, wolffd@0: double cof[], double *dev); wolffd@0: double ratval(double x, double cof[], int mm, int kk); wolffd@0: float rc(float x, float y); wolffd@0: float rd(float x, float y, float z); wolffd@0: void realft(float data[], unsigned long n, int isign); wolffd@0: void rebin(float rc, int nd, float r[], float xin[], float xi[]); wolffd@0: void red(int iz1, int iz2, int jz1, int jz2, int jm1, int jm2, int jmf, wolffd@0: int ic1, int jc1, int jcf, int kc, float ***c, float **s); wolffd@0: void relax(double **u, double **rhs, int n); wolffd@0: void relax2(double **u, double **rhs, int n); wolffd@0: void resid(double **res, double **u, double **rhs, int n); wolffd@0: float revcst(float x[], float y[], int iorder[], int ncity, int n[]); wolffd@0: void reverse(int iorder[], int ncity, int n[]); wolffd@0: float rf(float x, float y, float z); wolffd@0: float rj(float x, float y, float z, float p); wolffd@0: void rk4(float y[], float dydx[], int n, float x, float h, float yout[], wolffd@0: void (*derivs)(float, float [], float [])); wolffd@0: void rkck(float y[], float dydx[], int n, float x, float h, wolffd@0: float yout[], float yerr[], void (*derivs)(float, float [], float [])); wolffd@0: void rkdumb(float vstart[], int nvar, float x1, float x2, int nstep, wolffd@0: void (*derivs)(float, float [], float [])); wolffd@0: void rkqs(float y[], float dydx[], int n, float *x, wolffd@0: float htry, float eps, float yscal[], float *hdid, float *hnext, wolffd@0: void (*derivs)(float, float [], float [])); wolffd@0: void rlft3(float ***data, float **speq, unsigned long nn1, wolffd@0: unsigned long nn2, unsigned long nn3, int isign); wolffd@0: float rofunc(float b); wolffd@0: void rotate(float **r, float **qt, int n, int i, float a, float b); wolffd@0: void rsolv(float **a, int n, float d[], float b[]); wolffd@0: void rstrct(double **uc, double **uf, int nc); wolffd@0: float rtbis(float (*func)(float), float x1, float x2, float xacc); wolffd@0: float rtflsp(float (*func)(float), float x1, float x2, float xacc); wolffd@0: float rtnewt(void (*funcd)(float, float *, float *), float x1, float x2, wolffd@0: float xacc); wolffd@0: float rtsafe(void (*funcd)(float, float *, float *), float x1, float x2, wolffd@0: float xacc); wolffd@0: float rtsec(float (*func)(float), float x1, float x2, float xacc); wolffd@0: void rzextr(int iest, float xest, float yest[], float yz[], float dy[], int nv); wolffd@0: void savgol(float c[], int np, int nl, int nr, int ld, int m); wolffd@0: void score(float xf, float y[], float f[]); wolffd@0: void scrsho(float (*fx)(float)); wolffd@0: float select(unsigned long k, unsigned long n, float arr[]); wolffd@0: float selip(unsigned long k, unsigned long n, float arr[]); wolffd@0: void shell(unsigned long n, float a[]); wolffd@0: void shoot(int n, float v[], float f[]); wolffd@0: void shootf(int n, float v[], float f[]); wolffd@0: void simp1(float **a, int mm, int ll[], int nll, int iabf, int *kp, wolffd@0: float *bmax); wolffd@0: void simp2(float **a, int n, int l2[], int nl2, int *ip, int kp, float *q1); wolffd@0: void simp3(float **a, int i1, int k1, int ip, int kp); wolffd@0: void simplx(float **a, int m, int n, int m1, int m2, int m3, int *icase, wolffd@0: int izrov[], int iposv[]); wolffd@0: void simpr(float y[], float dydx[], float dfdx[], float **dfdy, wolffd@0: int n, float xs, float htot, int nstep, float yout[], wolffd@0: void (*derivs)(float, float [], float [])); wolffd@0: void sinft(float y[], int n); wolffd@0: void slvsm2(double **u, double **rhs); wolffd@0: void slvsml(double **u, double **rhs); wolffd@0: void sncndn(float uu, float emmc, float *sn, float *cn, float *dn); wolffd@0: double snrm(unsigned long n, double sx[], int itol); wolffd@0: void sobseq(int *n, float x[]); wolffd@0: void solvde(int itmax, float conv, float slowc, float scalv[], wolffd@0: int indexv[], int ne, int nb, int m, float **y, float ***c, float **s); wolffd@0: void sor(double **a, double **b, double **c, double **d, double **e, wolffd@0: double **f, double **u, int jmax, double rjac); wolffd@0: void sort(unsigned long n, float arr[]); wolffd@0: void sort2(unsigned long n, float arr[], float brr[]); wolffd@0: void sort3(unsigned long n, float ra[], float rb[], float rc[]); wolffd@0: void spctrm(FILE *fp, float p[], int m, int k, int ovrlap); wolffd@0: void spear(float data1[], float data2[], unsigned long n, float *d, float *zd, wolffd@0: float *probd, float *rs, float *probrs); wolffd@0: void sphbes(int n, float x, float *sj, float *sy, float *sjp, float *syp); wolffd@0: void splie2(float x1a[], float x2a[], float **ya, int m, int n, float **y2a); wolffd@0: void splin2(float x1a[], float x2a[], float **ya, float **y2a, int m, int n, wolffd@0: float x1, float x2, float *y); wolffd@0: void spline(float x[], float y[], int n, float yp1, float ypn, float y2[]); wolffd@0: void splint(float xa[], float ya[], float y2a[], int n, float x, float *y); wolffd@0: void spread(float y, float yy[], unsigned long n, float x, int m); wolffd@0: void sprsax(float sa[], unsigned long ija[], float x[], float b[], wolffd@0: unsigned long n); wolffd@0: void sprsin(float **a, int n, float thresh, unsigned long nmax, float sa[], wolffd@0: unsigned long ija[]); wolffd@0: void sprspm(float sa[], unsigned long ija[], float sb[], unsigned long ijb[], wolffd@0: float sc[], unsigned long ijc[]); wolffd@0: void sprstm(float sa[], unsigned long ija[], float sb[], unsigned long ijb[], wolffd@0: float thresh, unsigned long nmax, float sc[], unsigned long ijc[]); wolffd@0: void sprstp(float sa[], unsigned long ija[], float sb[], unsigned long ijb[]); wolffd@0: void sprstx(float sa[], unsigned long ija[], float x[], float b[], wolffd@0: unsigned long n); wolffd@0: void stifbs(float y[], float dydx[], int nv, float *xx, wolffd@0: float htry, float eps, float yscal[], float *hdid, float *hnext, wolffd@0: void (*derivs)(float, float [], float [])); wolffd@0: void stiff(float y[], float dydx[], int n, float *x, wolffd@0: float htry, float eps, float yscal[], float *hdid, float *hnext, wolffd@0: void (*derivs)(float, float [], float [])); wolffd@0: void stoerm(float y[], float d2y[], int nv, float xs, wolffd@0: float htot, int nstep, float yout[], wolffd@0: void (*derivs)(float, float [], float [])); wolffd@0: void svbksb(float **u, float w[], float **v, int m, int n, float b[], wolffd@0: float x[]); wolffd@0: void svdcmp(float **a, int m, int n, float w[], float **v); wolffd@0: void svdfit(float x[], float y[], float sig[], int ndata, float a[], wolffd@0: int ma, float **u, float **v, float w[], float *chisq, wolffd@0: void (*funcs)(float, float [], int)); wolffd@0: void svdvar(float **v, int ma, float w[], float **cvm); wolffd@0: void toeplz(float r[], float x[], float y[], int n); wolffd@0: void tptest(float data1[], float data2[], unsigned long n, float *t, float *prob); wolffd@0: void tqli(float d[], float e[], int n, float **z); wolffd@0: float trapzd(float (*func)(float), float a, float b, int n); wolffd@0: void tred2(float **a, int n, float d[], float e[]); wolffd@0: void tridag(float a[], float b[], float c[], float r[], float u[], wolffd@0: unsigned long n); wolffd@0: float trncst(float x[], float y[], int iorder[], int ncity, int n[]); wolffd@0: void trnspt(int iorder[], int ncity, int n[]); wolffd@0: void ttest(float data1[], unsigned long n1, float data2[], unsigned long n2, wolffd@0: float *t, float *prob); wolffd@0: void tutest(float data1[], unsigned long n1, float data2[], unsigned long n2, wolffd@0: float *t, float *prob); wolffd@0: void twofft(float data1[], float data2[], float fft1[], float fft2[], wolffd@0: unsigned long n); wolffd@0: void vander(double x[], double w[], double q[], int n); wolffd@0: void vegas(float regn[], int ndim, float (*fxn)(float [], float), int init, wolffd@0: unsigned long ncall, int itmx, int nprn, float *tgral, float *sd, wolffd@0: float *chi2a); wolffd@0: void voltra(int n, int m, float t0, float h, float *t, float **f, wolffd@0: float (*g)(int, float), float (*ak)(int, int, float, float)); wolffd@0: void wt1(float a[], unsigned long n, int isign, wolffd@0: void (*wtstep)(float [], unsigned long, int)); wolffd@0: void wtn(float a[], unsigned long nn[], int ndim, int isign, wolffd@0: void (*wtstep)(float [], unsigned long, int)); wolffd@0: void wwghts(float wghts[], int n, float h, wolffd@0: void (*kermom)(double [], double ,int)); wolffd@0: int zbrac(float (*func)(float), float *x1, float *x2); wolffd@0: void zbrak(float (*fx)(float), float x1, float x2, int n, float xb1[], wolffd@0: float xb2[], int *nb); wolffd@0: float zbrent(float (*func)(float), float x1, float x2, float tol); wolffd@0: void zrhqr(float a[], int m, float rtr[], float rti[]); wolffd@0: float zriddr(float (*func)(float), float x1, float x2, float xacc); wolffd@0: void zroots(fcomplex a[], int m, fcomplex roots[], int polish); wolffd@0: wolffd@0: #endif /* _NR_H_ */