nr.h

Go to the documentation of this file.
00001 #ifndef _NR_H_
00002 #define _NR_H_
00003 
00004 #ifndef _FCOMPLEX_DECLARE_T_
00005 typedef struct FCOMPLEX {float r,i;} fcomplex;
00006 #define _FCOMPLEX_DECLARE_T_
00007 #endif /* _FCOMPLEX_DECLARE_T_ */
00008 
00009 #ifndef _ARITHCODE_DECLARE_T_
00010 typedef struct {
00011         unsigned long *ilob,*iupb,*ncumfq,jdif,nc,minint,nch,ncum,nrad;
00012 } arithcode;
00013 #define _ARITHCODE_DECLARE_T_
00014 #endif /* _ARITHCODE_DECLARE_T_ */
00015 
00016 #ifndef _HUFFCODE_DECLARE_T_
00017 typedef struct {
00018         unsigned long *icod,*ncod,*left,*right,nch,nodemax;
00019 } huffcode;
00020 #define _HUFFCODE_DECLARE_T_
00021 #endif /* _HUFFCODE_DECLARE_T_ */
00022 
00023 #include <stdio.h>
00024 
00025 #if defined(__STDC__) || defined(ANSI) || defined(NRANSI) /* ANSI */
00026 
00027 void addint(double **uf, double **uc, double **res, int nf);
00028 void airy(float x, float *ai, float *bi, float *aip, float *bip);
00029 void amebsa(float **p, float y[], int ndim, float pb[], float *yb,
00030         float ftol, float (*funk)(float []), int *iter, float temptr);
00031 void amoeba(float **p, float y[], int ndim, float ftol,
00032         float (*funk)(float []), int *iter);
00033 float amotry(float **p, float y[], float psum[], int ndim,
00034         float (*funk)(float []), int ihi, float fac);
00035 float amotsa(float **p, float y[], float psum[], int ndim, float pb[],
00036         float *yb, float (*funk)(float []), int ihi, float *yhi, float fac);
00037 void anneal(float x[], float y[], int iorder[], int ncity);
00038 double anorm2(double **a, int n);
00039 void arcmak(unsigned long nfreq[], unsigned long nchh, unsigned long nradd,
00040         arithcode *acode);
00041 void arcode(unsigned long *ich, unsigned char **codep, unsigned long *lcode,
00042         unsigned long *lcd, int isign, arithcode *acode);
00043 void arcsum(unsigned long iin[], unsigned long iout[], unsigned long ja,
00044         int nwk, unsigned long nrad, unsigned long nc);
00045 void asolve(unsigned long n, double b[], double x[], int itrnsp);
00046 void atimes(unsigned long n, double x[], double r[], int itrnsp);
00047 void avevar(float data[], unsigned long n, float *ave, float *var);
00048 void balanc(float **a, int n);
00049 void banbks(float **a, unsigned long n, int m1, int m2, float **al,
00050         unsigned long indx[], float b[]);
00051 void bandec(float **a, unsigned long n, int m1, int m2, float **al,
00052         unsigned long indx[], float *d);
00053 void banmul(float **a, unsigned long n, int m1, int m2, float x[], float b[]);
00054 void bcucof(float y[], float y1[], float y2[], float y12[], float d1,
00055         float d2, float **c);
00056 void bcuint(float y[], float y1[], float y2[], float y12[],
00057         float x1l, float x1u, float x2l, float x2u, float x1,
00058         float x2, float *ansy, float *ansy1, float *ansy2);
00059 void beschb(double x, double *gam1, double *gam2, double *gampl,
00060         double *gammi);
00061 float bessi(int n, float x);
00062 float bessi0(float x);
00063 float bessi1(float x);
00064 void bessik(float x, float xnu, float *ri, float *rk, float *rip,
00065         float *rkp);
00066 float bessj(int n, float x);
00067 float bessj0(float x);
00068 float bessj1(float x);
00069 void bessjy(float x, float xnu, float *rj, float *ry, float *rjp,
00070         float *ryp);
00071 float bessk(int n, float x);
00072 float bessk0(float x);
00073 float bessk1(float x);
00074 float bessy(int n, float x);
00075 float bessy0(float x);
00076 float bessy1(float x);
00077 float beta(float z, float w);
00078 float betacf(float a, float b, float x);
00079 float betai(float a, float b, float x);
00080 float bico(int n, int k);
00081 void bksub(int ne, int nb, int jf, int k1, int k2, float ***c);
00082 float bnldev(float pp, int n, long *idum);
00083 float brent(float ax, float bx, float cx,
00084         float (*f)(float), float tol, float *xmin);
00085 void broydn(float x[], int n, int *check,
00086         void (*vecfunc)(int, float [], float []));
00087 void bsstep(float y[], float dydx[], int nv, float *xx, float htry,
00088         float eps, float yscal[], float *hdid, float *hnext,
00089         void (*derivs)(float, float [], float []));
00090 void caldat(long julian, int *mm, int *id, int *iyyy);
00091 void chder(float a, float b, float c[], float cder[], int n);
00092 float chebev(float a, float b, float c[], int m, float x);
00093 void chebft(float a, float b, float c[], int n, float (*func)(float));
00094 void chebpc(float c[], float d[], int n);
00095 void chint(float a, float b, float c[], float cint[], int n);
00096 float chixy(float bang);
00097 void choldc(float **a, int n, float p[]);
00098 void cholsl(float **a, int n, float p[], float b[], float x[]);
00099 void chsone(float bins[], float ebins[], int nbins, int knstrn,
00100         float *df, float *chsq, float *prob);
00101 void chstwo(float bins1[], float bins2[], int nbins, int knstrn,
00102         float *df, float *chsq, float *prob);
00103 void cisi(float x, float *ci, float *si);
00104 void cntab1(int **nn, int ni, int nj, float *chisq,
00105         float *df, float *prob, float *cramrv, float *ccc);
00106 void cntab2(int **nn, int ni, int nj, float *h, float *hx, float *hy,
00107         float *hygx, float *hxgy, float *uygx, float *uxgy, float *uxy);
00108 void convlv(float data[], unsigned long n, float respns[], unsigned long m,
00109         int isign, float ans[]);
00110 void copy(double **aout, double **ain, int n);
00111 void correl(float data1[], float data2[], unsigned long n, float ans[]);
00112 void cosft(float y[], int n, int isign);
00113 void cosft1(float y[], int n);
00114 void cosft2(float y[], int n, int isign);
00115 void covsrt(double **covar, int ma, int ia[], int mfit);
00116 void crank(unsigned long n, float w[], float *s);
00117 void cyclic(float a[], float b[], float c[], float alpha, float beta,
00118         float r[], float x[], unsigned long n);
00119 void daub4(float a[], unsigned long n, int isign);
00120 float dawson(float x);
00121 float dbrent(float ax, float bx, float cx,
00122         float (*f)(float), float (*df)(float), float tol, float *xmin);
00123 void ddpoly(float c[], int nc, float x, float pd[], int nd);
00124 int decchk(char string[], int n, char *ch);
00125 void derivs(float x, float y[], float dydx[]);
00126 float df1dim(float x);
00127 void dfour1(double data[], unsigned long nn, int isign);
00128 void dfpmin(float p[], int n, float gtol, int *iter, float *fret,
00129         float (*func)(float []), void (*dfunc)(float [], float []));
00130 float dfridr(float (*func)(float), float x, float h, float *err);
00131 void dftcor(float w, float delta, float a, float b, float endpts[],
00132         float *corre, float *corim, float *corfac);
00133 void dftint(float (*func)(float), float a, float b, float w,
00134         float *cosint, float *sinint);
00135 void difeq(int k, int k1, int k2, int jsf, int is1, int isf,
00136         int indexv[], int ne, float **s, float **y);
00137 void dlinmin(float p[], float xi[], int n, float *fret,
00138         float (*func)(float []), void (*dfunc)(float [], float[]));
00139 double dpythag(double a, double b);
00140 void drealft(double data[], unsigned long n, int isign);
00141 void dsprsax(double sa[], unsigned long ija[], double x[], double b[],
00142         unsigned long n);
00143 void dsprstx(double sa[], unsigned long ija[], double x[], double b[],
00144         unsigned long n);
00145 void dsvbksb(double **u, double w[], double **v, int m, int n, double b[],
00146         double x[]);
00147 void dsvdcmp(double **a, int m, int n, double w[], double **v);
00148 void eclass(int nf[], int n, int lista[], int listb[], int m);
00149 void eclazz(int nf[], int n, int (*equiv)(int, int));
00150 float ei(float x);
00151 void eigsrt(float d[], float **v, int n);
00152 float elle(float phi, float ak);
00153 float ellf(float phi, float ak);
00154 float ellpi(float phi, float en, float ak);
00155 void elmhes(float **a, int n);
00156 float erfcc(float x);
00157 float erff(float x);
00158 float erffc(float x);
00159 void eulsum(float *sum, float term, int jterm, float wksp[]);
00160 float evlmem(float fdt, float d[], int m, float xms);
00161 float expdev(long *idum);
00162 float expint(int n, float x);
00163 float f1(float x);
00164 float f1dim(float x);
00165 float f2(float y);
00166 float f3(float z);
00167 float factln(int n);
00168 float factrl(int n);
00169 void fasper(float x[], float y[], unsigned long n, float ofac, float hifac,
00170         float wk1[], float wk2[], unsigned long nwk, unsigned long *nout,
00171         unsigned long *jmax, float *prob);
00172 void fdjac(int n, float x[], float fvec[], float **df,
00173         void (*vecfunc)(int, float [], float []));
00174 void fgauss(float x, float a[], float *y, float dyda[], int na);
00175 void fill0(double **u, int n);
00176 void fit(float x[], float y[], int ndata, float sig[], int mwt,
00177         float *a, float *b, float *siga, float *sigb, float *chi2, float *q);
00178 void fitexy(float x[], float y[], int ndat, float sigx[], float sigy[],
00179         float *a, float *b, float *siga, float *sigb, float *chi2, float *q);
00180 void fixrts(float d[], int m);
00181 void fleg(float x, float pl[], int nl);
00182 void flmoon(int n, int nph, long *jd, float *frac);
00183 //float fmin(float x[]);
00184 void four1(float data[], unsigned long nn, int isign);
00185 void fourew(FILE *file[5], int *na, int *nb, int *nc, int *nd);
00186 void fourfs(FILE *file[5], unsigned long nn[], int ndim, int isign);
00187 void fourn(float data[], unsigned long nn[], int ndim, int isign);
00188 void fpoly(float x, float p[], int np);
00189 void fred2(int n, float a, float b, float t[], float f[], float w[],
00190         float (*g)(float), float (*ak)(float, float));
00191 float fredin(float x, int n, float a, float b, float t[], float f[], float w[],
00192         float (*g)(float), float (*ak)(float, float));
00193 void frenel(float x, float *s, float *c);
00194 void frprmn(float p[], int n, float ftol, int *iter, float *fret,
00195         float (*func)(float []), void (*dfunc)(float [], float []));
00196 void ftest(float data1[], unsigned long n1, float data2[], unsigned long n2,
00197         float *f, float *prob);
00198 float gamdev(int ia, long *idum);
00199 float gammln(float xx);
00200 float gammp(float a, float x);
00201 float gammq(float a, float x);
00202 double gasdev(long *idum);
00203 void gaucof(int n, float a[], float b[], float amu0, float x[], float w[]);
00204 void gauher(float x[], float w[], int n);
00205 void gaujac(float x[], float w[], int n, float alf, float bet);
00206 void gaulag(float x[], float w[], int n, float alf);
00207 void gauleg(float x1, float x2, float x[], float w[], int n);
00208 void gaussj(double **a, int n, double **b, int m);
00209 void gcf(float *gammcf, float a, float x, float *gln);
00210 float golden(float ax, float bx, float cx, float (*f)(float), float tol,
00211         float *xmin);
00212 void gser(float *gamser, float a, float x, float *gln);
00213 void hpsel(unsigned long m, unsigned long n, float arr[], float heap[]);
00214 void hpsort(unsigned long n, float ra[]);
00215 void hqr(float **a, int n, float wr[], float wi[]);
00216 void hufapp(unsigned long index[], unsigned long nprob[], unsigned long n,
00217         unsigned long i);
00218 void hufdec(unsigned long *ich, unsigned char *code, unsigned long lcode,
00219         unsigned long *nb, huffcode *hcode);
00220 void hufenc(unsigned long ich, unsigned char **codep, unsigned long *lcode,
00221         unsigned long *nb, huffcode *hcode);
00222 void hufmak(unsigned long nfreq[], unsigned long nchin, unsigned long *ilong,
00223         unsigned long *nlong, huffcode *hcode);
00224 void hunt(float xx[], unsigned long n, float x, unsigned long *jlo);
00225 void hypdrv(float s, float yy[], float dyyds[]);
00226 fcomplex hypgeo(fcomplex a, fcomplex b, fcomplex c, fcomplex z);
00227 void hypser(fcomplex a, fcomplex b, fcomplex c, fcomplex z,
00228         fcomplex *series, fcomplex *deriv);
00229 unsigned short icrc(unsigned short crc, unsigned char *bufptr,
00230         unsigned long len, short jinit, int jrev);
00231 unsigned short icrc1(unsigned short crc, unsigned char onech);
00232 unsigned long igray(unsigned long n, int is);
00233 void iindexx(unsigned long n, long arr[], unsigned long indx[]);
00234 void indexx(unsigned long n, float arr[], unsigned long indx[]);
00235 void interp(double **uf, double **uc, int nf);
00236 int irbit1(unsigned long *iseed);
00237 int irbit2(unsigned long *iseed);
00238 void jacobi(float **a, int n, float d[], float **v, int *nrot);
00239 void jacobn(float x, float y[], float dfdx[], float **dfdy, int n);
00240 long julday(int mm, int id, int iyyy);
00241 void kendl1(float data1[], float data2[], unsigned long n, float *tau, float *z,
00242         float *prob);
00243 void kendl2(float **tab, int i, int j, float *tau, float *z, float *prob);
00244 void kermom(double w[], double y, int m);
00245 void ks2d1s(float x1[], float y1[], unsigned long n1,
00246         void (*quadvl)(float, float, float *, float *, float *, float *),
00247         float *d1, float *prob);
00248 void ks2d2s(float x1[], float y1[], unsigned long n1, float x2[], float y2[],
00249         unsigned long n2, float *d, float *prob);
00250 void ksone(float data[], unsigned long n, float (*func)(float), float *d,
00251         float *prob);
00252 void kstwo(float data1[], unsigned long n1, float data2[], unsigned long n2,
00253         float *d, float *prob);
00254 void laguer(fcomplex a[], int m, fcomplex *x, int *its);
00255 void lfit(float x[], float y[], float sig[], int ndat, float a[], int ia[],
00256         int ma, float **covar, float *chisq, void (*funcs)(float, float [], int));
00257 void linbcg(unsigned long n, double b[], double x[], int itol, double tol,
00258          int itmax, int *iter, double *err);
00259 void linmin(float p[], float xi[], int n, float *fret,
00260         float (*func)(float []));
00261 void lnsrch(int n, float xold[], float fold, float g[], float p[], float x[],
00262          float *f, float stpmax, int *check, float (*func)(float []));
00263 void load(float x1, float v[], float y[]);
00264 void load1(float x1, float v1[], float y[]);
00265 void load2(float x2, float v2[], float y[]);
00266 void locate(float xx[], unsigned long n, float x, unsigned long *j);
00267 void lop(double **out, double **u, int n);
00268 void lubksb(float **a, int n, int *indx, float b[]);
00269 void ludcmp(float **a, int n, int *indx, float *d);
00270 void machar(int *ibeta, int *it, int *irnd, int *ngrd,
00271         int *machep, int *negep, int *iexp, int *minexp, int *maxexp,
00272         float *eps, float *epsneg, float *xmin, float *xmax);
00273 void matadd(double **a, double **b, double **c, int n);
00274 void matsub(double **a, double **b, double **c, int n);
00275 void medfit(float x[], float y[], int ndata, float *a, float *b, float *abdev);
00276 void memcof(float data[], int n, int m, float *xms, float d[]);
00277 int metrop(float de, float t);
00278 void mgfas(double **u, int n, int maxcyc);
00279 void mglin(double **u, int n, int ncycle);
00280 float midexp(float (*funk)(float), float aa, float bb, int n);
00281 float midinf(float (*funk)(float), float aa, float bb, int n);
00282 float midpnt(float (*func)(float), float a, float b, int n);
00283 float midsql(float (*funk)(float), float aa, float bb, int n);
00284 float midsqu(float (*funk)(float), float aa, float bb, int n);
00285 void miser(float (*func)(float []), float regn[], int ndim, unsigned long npts,
00286         float dith, float *ave, float *var);
00287 void mmid(float y[], float dydx[], int nvar, float xs, float htot,
00288         int nstep, float yout[], void (*derivs)(float, float[], float[]));
00289 void mnbrak(float *ax, float *bx, float *cx, float *fa, float *fb,
00290         float *fc, float (*func)(float));
00291 void mnewt(int ntrial, float x[], int n, float tolx, float tolf);
00292 void moment(float data[], int n, float *ave, float *adev, float *sdev,
00293         float *var, float *skew, float *curt);
00294 void mp2dfr(unsigned char a[], unsigned char s[], int n, int *m);
00295 void mpadd(unsigned char w[], unsigned char u[], unsigned char v[], int n);
00296 void mpdiv(unsigned char q[], unsigned char r[], unsigned char u[],
00297         unsigned char v[], int n, int m);
00298 void mpinv(unsigned char u[], unsigned char v[], int n, int m);
00299 void mplsh(unsigned char u[], int n);
00300 void mpmov(unsigned char u[], unsigned char v[], int n);
00301 void mpmul(unsigned char w[], unsigned char u[], unsigned char v[], int n,
00302         int m);
00303 void mpneg(unsigned char u[], int n);
00304 void mppi(int n);
00305 void mprove(float **a, float **alud, int n, int indx[], float b[],
00306         float x[]);
00307 void mpsad(unsigned char w[], unsigned char u[], int n, int iv);
00308 void mpsdv(unsigned char w[], unsigned char u[], int n, int iv, int *ir);
00309 void mpsmu(unsigned char w[], unsigned char u[], int n, int iv);
00310 void mpsqrt(unsigned char w[], unsigned char u[], unsigned char v[], int n,
00311         int m);
00312 void mpsub(int *is, unsigned char w[], unsigned char u[], unsigned char v[],
00313         int n);
00314 void mrqcof(double x[], double y[], double z[], double sig[], int ndata, double a[],
00315         int ia[], int ma, double **alpha, double beta[], double *chisq,
00316         void (*funcs)(double, double, double [], double *, double [], int));
00317 void mrqmin(double x[], double y[], double z[], double sig[], int ndata, double a[],
00318         int ia[], int ma, double **covar, double **alpha, double *chisq,
00319         void (*funcs)(double, double, double [], double *, double [], int), double *alamda);
00320 void newt(float x[], int n, int *check,
00321         void (*vecfunc)(int, float [], float []));
00322 void nlinmod(double col, double ams, double a[], double *dmag, double ddmagda[], int na);
00323 void odeint(float ystart[], int nvar, float x1, float x2,
00324         float eps, float h1, float hmin, int *nok, int *nbad,
00325         void (*derivs)(float, float [], float []),
00326         void (*rkqs)(float [], float [], int, float *, float, float,
00327         float [], float *, float *, void (*)(float, float [], float [])));
00328 void orthog(int n, float anu[], float alpha[], float beta[], float a[],
00329         float b[]);
00330 void pade(double cof[], int n, float *resid);
00331 void pccheb(float d[], float c[], int n);
00332 void pcshft(float a, float b, float d[], int n);
00333 void pearsn(float x[], float y[], unsigned long n, float *r, float *prob,
00334         float *z);
00335 void period(float x[], float y[], int n, float ofac, float hifac,
00336         float px[], float py[], int np, int *nout, int *jmax, float *prob);
00337 void piksr2(int n, float arr[], float brr[]);
00338 void piksrt(int n, float arr[]);
00339 void pinvs(int ie1, int ie2, int je1, int jsf, int jc1, int k,
00340         float ***c, float **s);
00341 float plgndr(int l, int m, float x);
00342 float poidev(float xm, long *idum);
00343 void polcoe(float x[], float y[], int n, float cof[]);
00344 void polcof(float xa[], float ya[], int n, float cof[]);
00345 void poldiv(float u[], int n, float v[], int nv, float q[], float r[]);
00346 void polin2(float x1a[], float x2a[], float **ya, int m, int n,
00347         float x1, float x2, float *y, float *dy);
00348 void polint(float xa[], float ya[], int n, float x, float *y, float *dy);
00349 void powell(float p[], float **xi, int n, float ftol, int *iter, float *fret,
00350         float (*func)(float []));
00351 void predic(float data[], int ndata, float d[], int m, float future[], int nfut);
00352 float probks(float alam);
00353 void psdes(unsigned long *lword, unsigned long *irword);
00354 void pwt(float a[], unsigned long n, int isign);
00355 void pwtset(int n);
00356 float pythag(float a, float b);
00357 void pzextr(int iest, float xest, float yest[], float yz[], float dy[],
00358         int nv);
00359 float qgaus(float (*func)(float), float a, float b);
00360 void qrdcmp(float **a, int n, float *c, float *d, int *sing);
00361 float qromb(float (*func)(float), float a, float b);
00362 float qromo(float (*func)(float), float a, float b,
00363         float (*choose)(float (*)(float), float, float, int));
00364 void qroot(float p[], int n, float *b, float *c, float eps);
00365 void qrsolv(float **a, int n, float c[], float d[], float b[]);
00366 void qrupdt(float **r, float **qt, int n, float u[], float v[]);
00367 float qsimp(float (*func)(float), float a, float b);
00368 float qtrap(float (*func)(float), float a, float b);
00369 float quad3d(float (*func)(float, float, float), float x1, float x2);
00370 void quadct(float x, float y, float xx[], float yy[], unsigned long nn,
00371         float *fa, float *fb, float *fc, float *fd);
00372 void quadmx(float **a, int n);
00373 void quadvl(float x, float y, float *fa, float *fb, float *fc, float *fd);
00374 float ran0(long *idum);
00375 double ran1(long *idum);
00376 float ran2(long *idum);
00377 float ran3(long *idum);
00378 float ran4(long *idum);
00379 void rank(unsigned long n, unsigned long indx[], unsigned long irank[]);
00380 void ranpt(float pt[], float regn[], int n);
00381 void ratint(float xa[], float ya[], int n, float x, float *y, float *dy);
00382 void ratlsq(double (*fn)(double), double a, double b, int mm, int kk,
00383         double cof[], double *dev);
00384 double ratval(double x, double cof[], int mm, int kk);
00385 float rc(float x, float y);
00386 float rd(float x, float y, float z);
00387 void realft(float data[], unsigned long n, int isign);
00388 void rebin(float rc, int nd, float r[], float xin[], float xi[]);
00389 void red(int iz1, int iz2, int jz1, int jz2, int jm1, int jm2, int jmf,
00390         int ic1, int jc1, int jcf, int kc, float ***c, float **s);
00391 void relax(double **u, double **rhs, int n);
00392 void relax2(double **u, double **rhs, int n);
00393 void resid(double **res, double **u, double **rhs, int n);
00394 float revcst(float x[], float y[], int iorder[], int ncity, int n[]);
00395 void reverse(int iorder[], int ncity, int n[]);
00396 float rf(float x, float y, float z);
00397 float rj(float x, float y, float z, float p);
00398 void rk4(float y[], float dydx[], int n, float x, float h, float yout[],
00399         void (*derivs)(float, float [], float []));
00400 void rkck(float y[], float dydx[], int n, float x, float h,
00401         float yout[], float yerr[], void (*derivs)(float, float [], float []));
00402 void rkdumb(float vstart[], int nvar, float x1, float x2, int nstep,
00403         void (*derivs)(float, float [], float []));
00404 void rkqs(float y[], float dydx[], int n, float *x,
00405         float htry, float eps, float yscal[], float *hdid, float *hnext,
00406         void (*derivs)(float, float [], float []));
00407 void rlft3(float ***data, float **speq, unsigned long nn1,
00408         unsigned long nn2, unsigned long nn3, int isign);
00409 float rofunc(float b);
00410 void rotate(float **r, float **qt, int n, int i, float a, float b);
00411 void rsolv(float **a, int n, float d[], float b[]);
00412 void rstrct(double **uc, double **uf, int nc);
00413 float rtbis(float (*func)(float), float x1, float x2, float xacc);
00414 float rtflsp(float (*func)(float), float x1, float x2, float xacc);
00415 float rtnewt(void (*funcd)(float, float *, float *), float x1, float x2,
00416         float xacc);
00417 float rtsafe(void (*funcd)(float, float *, float *), float x1, float x2,
00418         float xacc);
00419 float rtsec(float (*func)(float), float x1, float x2, float xacc);
00420 void rzextr(int iest, float xest, float yest[], float yz[], float dy[], int nv);
00421 void savgol(float c[], int np, int nl, int nr, int ld, int m);
00422 void score(float xf, float y[], float f[]);
00423 void scrsho(float (*fx)(float));
00424 // float select(unsigned long k, unsigned long n, float arr[]);
00425 float selip(unsigned long k, unsigned long n, float arr[]);
00426 void shell(unsigned long n, float a[]);
00427 void shoot(int n, float v[], float f[]);
00428 void shootf(int n, float v[], float f[]);
00429 void simp1(float **a, int mm, int ll[], int nll, int iabf, int *kp,
00430         float *bmax);
00431 void simp2(float **a, int m, int n, int *ip, int kp);
00432 void simp3(float **a, int i1, int k1, int ip, int kp);
00433 void simplx(float **a, int m, int n, int m1, int m2, int m3, int *icase,
00434         int izrov[], int iposv[]);
00435 void simpr(float y[], float dydx[], float dfdx[], float **dfdy,
00436         int n, float xs, float htot, int nstep, float yout[],
00437         void (*derivs)(float, float [], float []));
00438 void sinft(float y[], int n);
00439 void slvsm2(double **u, double **rhs);
00440 void slvsml(double **u, double **rhs);
00441 void sncndn(float uu, float emmc, float *sn, float *cn, float *dn);
00442 double snrm(unsigned long n, double sx[], int itol);
00443 void sobseq(int *n, float x[]);
00444 void solmat(double **a, int n, double **b, int m);
00445 void solvde(int itmax, float conv, float slowc, float scalv[],
00446         int indexv[], int ne, int nb, int m, float **y, float ***c, float **s);
00447 void sor(double **a, double **b, double **c, double **d, double **e,
00448         double **f, double **u, int jmax, double rjac);
00449 void sort(unsigned long n, float arr[]);
00450 void sort2(unsigned long n, float arr[], float brr[]);
00451 void sort3(unsigned long n, float ra[], float rb[], float rc[]);
00452 void spctrm(FILE *fp, float p[], int m, int k, int ovrlap);
00453 void spear(float data1[], float data2[], unsigned long n, float *d, float *zd,
00454         float *probd, float *rs, float *probrs);
00455 void sphbes(int n, float x, float *sj, float *sy, float *sjp, float *syp);
00456 void splie2(float x1a[], float x2a[], float **ya, int m, int n, float **y2a);
00457 void splin2(float x1a[], float x2a[], float **ya, float **y2a, int m, int n,
00458         float x1, float x2, float *y);
00459 void spline(float x[], float y[], int n, float yp1, float ypn, float y2[]);
00460 void splint(float xa[], float ya[], float y2a[], int n, float x, float *y);
00461 void spread(float y, float yy[], unsigned long n, float x, int m);
00462 void sprsax(float sa[], unsigned long ija[], float x[], float b[],
00463         unsigned long n);
00464 void sprsin(float **a, int n, float thresh, unsigned long nmax, float sa[],
00465         unsigned long ija[]);
00466 void sprspm(float sa[], unsigned long ija[], float sb[], unsigned long ijb[],
00467         float sc[], unsigned long ijc[]);
00468 void sprstm(float sa[], unsigned long ija[], float sb[], unsigned long ijb[],
00469         float thresh, unsigned long nmax, float sc[], unsigned long ijc[]);
00470 void sprstp(float sa[], unsigned long ija[], float sb[], unsigned long ijb[]);
00471 void sprstx(float sa[], unsigned long ija[], float x[], float b[],
00472         unsigned long n);
00473 void stifbs(float y[], float dydx[], int nv, float *xx,
00474         float htry, float eps, float yscal[], float *hdid, float *hnext,
00475         void (*derivs)(float, float [], float []));
00476 void stiff(float y[], float dydx[], int n, float *x,
00477         float htry, float eps, float yscal[], float *hdid, float *hnext,
00478         void (*derivs)(float, float [], float []));
00479 void stoerm(float y[], float d2y[], int nv, float xs,
00480         float htot, int nstep, float yout[],
00481         void (*derivs)(float, float [], float []));
00482 void svbksb(float **u, float w[], float **v, int m, int n, float b[],
00483         float x[]);
00484 void svdcmp(float **a, int m, int n, float w[], float **v);
00485 void svdfit(float x[], float y[], float sig[], int ndata, float a[],
00486         int ma, float **u, float **v, float w[], float *chisq,
00487         void (*funcs)(float, float [], int));
00488 void svdvar(float **v, int ma, float w[], float **cvm);
00489 void toeplz(float r[], float x[], float y[], int n);
00490 void tptest(float data1[], float data2[], unsigned long n, float *t, float *prob);
00491 void tqli(float d[], float e[], int n, float **z);
00492 float trapzd(float (*func)(float), float a, float b, int n);
00493 void tred2(float **a, int n, float d[], float e[]);
00494 void tridag(float a[], float b[], float c[], float r[], float u[],
00495         unsigned long n);
00496 float trncst(float x[], float y[], int iorder[], int ncity, int n[]);
00497 void trnspt(int iorder[], int ncity, int n[]);
00498 void ttest(float data1[], unsigned long n1, float data2[], unsigned long n2,
00499         float *t, float *prob);
00500 void tutest(float data1[], unsigned long n1, float data2[], unsigned long n2,
00501         float *t, float *prob);
00502 void twofft(float data1[], float data2[], float fft1[], float fft2[],
00503         unsigned long n);
00504 void vander(double x[], double w[], double q[], int n);
00505 void vegas(float regn[], int ndim, float (*fxn)(float [], float), int init,
00506         unsigned long ncall, int itmx, int nprn, float *tgral, float *sd,
00507         float *chi2a);
00508 void voltra(int n, int m, float t0, float h, float *t, float **f,
00509         float (*g)(int, float), float (*ak)(int, int, float, float));
00510 void wt1(float a[], unsigned long n, int isign,
00511         void (*wtstep)(float [], unsigned long, int));
00512 void wtn(float a[], unsigned long nn[], int ndim, int isign,
00513         void (*wtstep)(float [], unsigned long, int));
00514 void wwghts(float wghts[], int n, float h,
00515         void (*kermom)(double [], double ,int));
00516 int zbrac(float (*func)(float), float *x1, float *x2);
00517 void zbrak(float (*fx)(float), float x1, float x2, int n, float xb1[],
00518         float xb2[], int *nb);
00519 float zbrent(float (*func)(float), float x1, float x2, float tol);
00520 void zrhqr(float a[], int m, float rtr[], float rti[]);
00521 float zriddr(float (*func)(float), float x1, float x2, float xacc);
00522 void zroots(fcomplex a[], int m, fcomplex roots[], int polish);
00523 
00524 #else /* ANSI */
00525 /* traditional - K&R */
00526 
00527 void addint();
00528 void airy();
00529 void amebsa();
00530 void amoeba();
00531 float amotry();
00532 float amotsa();
00533 void anneal();
00534 double anorm2();
00535 void arcmak();
00536 void arcode();
00537 void arcsum();
00538 void asolve();
00539 void atimes();
00540 void avevar();
00541 void balanc();
00542 void banbks();
00543 void bandec();
00544 void banmul();
00545 void bcucof();
00546 void bcuint();
00547 void beschb();
00548 float bessi();
00549 float bessi0();
00550 float bessi1();
00551 void bessik();
00552 float bessj();
00553 float bessj0();
00554 float bessj1();
00555 void bessjy();
00556 float bessk();
00557 float bessk0();
00558 float bessk1();
00559 float bessy();
00560 float bessy0();
00561 float bessy1();
00562 float beta();
00563 float betacf();
00564 float betai();
00565 float bico();
00566 void bksub();
00567 float bnldev();
00568 float brent();
00569 void broydn();
00570 void bsstep();
00571 void caldat();
00572 void chder();
00573 float chebev();
00574 void chebft();
00575 void chebpc();
00576 void chint();
00577 float chixy();
00578 void choldc();
00579 void cholsl();
00580 void chsone();
00581 void chstwo();
00582 void cisi();
00583 void cntab1();
00584 void cntab2();
00585 void convlv();
00586 void copy();
00587 void correl();
00588 void cosft();
00589 void cosft1();
00590 void cosft2();
00591 void covsrt();
00592 void crank();
00593 void cyclic();
00594 void daub4();
00595 float dawson();
00596 float dbrent();
00597 void ddpoly();
00598 int decchk();
00599 void derivs();
00600 float df1dim();
00601 void dfour1();
00602 void dfpmin();
00603 float dfridr();
00604 void dftcor();
00605 void dftint();
00606 void difeq();
00607 void dlinmin();
00608 double dpythag();
00609 void drealft();
00610 void dsprsax();
00611 void dsprstx();
00612 void dsvbksb();
00613 void dsvdcmp();
00614 void eclass();
00615 void eclazz();
00616 float ei();
00617 void eigsrt();
00618 float elle();
00619 float ellf();
00620 float ellpi();
00621 void elmhes();
00622 float erfcc();
00623 float erff();
00624 float erffc();
00625 void eulsum();
00626 float evlmem();
00627 float expdev();
00628 float expint();
00629 float f1();
00630 float f1dim();
00631 float f2();
00632 float f3();
00633 float factln();
00634 float factrl();
00635 void fasper();
00636 void fdjac();
00637 void fgauss();
00638 void fill0();
00639 void fit();
00640 void fitexy();
00641 void fixrts();
00642 void fleg();
00643 void flmoon();
00644 //float fmin();
00645 void four1();
00646 void fourew();
00647 void fourfs();
00648 void fourn();
00649 void fpoly();
00650 void fred2();
00651 float fredin();
00652 void frenel();
00653 void frprmn();
00654 void ftest();
00655 float gamdev();
00656 float gammln();
00657 float gammp();
00658 float gammq();
00659 float gasdev();
00660 void gaucof();
00661 void gauher();
00662 void gaujac();
00663 void gaulag();
00664 void gauleg();
00665 void gaussj();
00666 void gcf();
00667 float golden();
00668 void gser();
00669 void hpsel();
00670 void hpsort();
00671 void hqr();
00672 void hufapp();
00673 void hufdec();
00674 void hufenc();
00675 void hufmak();
00676 void hunt();
00677 void hypdrv();
00678 fcomplex hypgeo();
00679 void hypser();
00680 unsigned short icrc();
00681 unsigned short icrc1();
00682 unsigned long igray();
00683 void iindexx();
00684 void indexx();
00685 void interp();
00686 int irbit1();
00687 int irbit2();
00688 void jacobi();
00689 void jacobn();
00690 long julday();
00691 void kendl1();
00692 void kendl2();
00693 void kermom();
00694 void ks2d1s();
00695 void ks2d2s();
00696 void ksone();
00697 void kstwo();
00698 void laguer();
00699 void lfit();
00700 void linbcg();
00701 void linmin();
00702 void lnsrch();
00703 void load();
00704 void load1();
00705 void load2();
00706 void locate();
00707 void lop();
00708 void lubksb();
00709 void ludcmp();
00710 void machar();
00711 void matadd();
00712 void matsub();
00713 void medfit();
00714 void memcof();
00715 int metrop();
00716 void mgfas();
00717 void mglin();
00718 float midexp();
00719 float midinf();
00720 float midpnt();
00721 float midsql();
00722 float midsqu();
00723 void miser();
00724 void mmid();
00725 void mnbrak();
00726 void mnewt();
00727 void moment();
00728 void mp2dfr();
00729 void mpadd();
00730 void mpdiv();
00731 void mpinv();
00732 void mplsh();
00733 void mpmov();
00734 void mpmul();
00735 void mpneg();
00736 void mppi();
00737 void mprove();
00738 void mpsad();
00739 void mpsdv();
00740 void mpsmu();
00741 void mpsqrt();
00742 void mpsub();
00743 void mrqcof();
00744 void mrqmin();
00745 void newt();
00746 void odeint();
00747 void orthog();
00748 void pade();
00749 void pccheb();
00750 void pcshft();
00751 void pearsn();
00752 void period();
00753 void piksr2();
00754 void piksrt();
00755 void pinvs();
00756 float plgndr();
00757 float poidev();
00758 void polcoe();
00759 void polcof();
00760 void poldiv();
00761 void polin2();
00762 void polint();
00763 void powell();
00764 void predic();
00765 float probks();
00766 void psdes();
00767 void pwt();
00768 void pwtset();
00769 float pythag();
00770 void pzextr();
00771 float qgaus();
00772 void qrdcmp();
00773 float qromb();
00774 float qromo();
00775 void qroot();
00776 void qrsolv();
00777 void qrupdt();
00778 float qsimp();
00779 float qtrap();
00780 float quad3d();
00781 void quadct();
00782 void quadmx();
00783 void quadvl();
00784 float ran0();
00785 float ran1();
00786 float ran2();
00787 float ran3();
00788 float ran4();
00789 void rank();
00790 void ranpt();
00791 void ratint();
00792 void ratlsq();
00793 double ratval();
00794 float rc();
00795 float rd();
00796 void realft();
00797 void rebin();
00798 void red();
00799 void relax();
00800 void relax2();
00801 void resid();
00802 float revcst();
00803 void reverse();
00804 float rf();
00805 float rj();
00806 void rk4();
00807 void rkck();
00808 void rkdumb();
00809 void rkqs();
00810 void rlft3();
00811 float rofunc();
00812 void rotate();
00813 void rsolv();
00814 void rstrct();
00815 float rtbis();
00816 float rtflsp();
00817 float rtnewt();
00818 float rtsafe();
00819 float rtsec();
00820 void rzextr();
00821 void savgol();
00822 void score();
00823 void scrsho();
00824 float select();
00825 float selip();
00826 void shell();
00827 void shoot();
00828 void shootf();
00829 void simp1();
00830 void simp2();
00831 void simp3();
00832 void simplx();
00833 void simpr();
00834 void sinft();
00835 void slvsm2();
00836 void slvsml();
00837 void sncndn();
00838 double snrm();
00839 void sobseq();
00840 void solvde();
00841 void sor();
00842 void sort();
00843 void sort2();
00844 void sort3();
00845 void spctrm();
00846 void spear();
00847 void sphbes();
00848 void splie2();
00849 void splin2();
00850 void spline();
00851 void splint();
00852 void spread();
00853 void sprsax();
00854 void sprsin();
00855 void sprspm();
00856 void sprstm();
00857 void sprstp();
00858 void sprstx();
00859 void stifbs();
00860 void stiff();
00861 void stoerm();
00862 void svbksb();
00863 void svdcmp();
00864 void svdfit();
00865 void svdvar();
00866 void toeplz();
00867 void tptest();
00868 void tqli();
00869 float trapzd();
00870 void tred2();
00871 void tridag();
00872 float trncst();
00873 void trnspt();
00874 void ttest();
00875 void tutest();
00876 void twofft();
00877 void vander();
00878 void vegas();
00879 void voltra();
00880 void wt1();
00881 void wtn();
00882 void wwghts();
00883 int zbrac();
00884 void zbrak();
00885 float zbrent();
00886 void zrhqr();
00887 float zriddr();
00888 void zroots();
00889 
00890 #endif /* ANSI */
00891 
00892 #endif /* _NR_H_ */

Generated on Mon Jun 5 15:35:17 2006 for WsaTools by  doxygen 1.4.5