Go to the source code of this file.
Defines | |
#define | float double |
Functions | |
void | bcucof (float *y, float *y1, float *y2, float *y12, float d1, float d2, float **c) |
void | bcuint (float *y, float *y1, float *y2, float *y12, float x1l, float x1u, float x2l, float x2u, float x1, float x2, float *ansy, float *ansy1, float *ansy2) |
float | bessj1 (float x) |
float | brent (float ax, float bx, float cx, float(*f)(float), float tol, float *xmin) |
float | f1dim (float x) |
void | four1 (float *data, int nn, int isign) |
float | gammln (float xx) |
float | gasdev (int *idum) |
void | hunt (float *xx, int n, float x, int *jlo) |
void | linmin (float *p, float *xi, int n, float *fret, float(*func)(float *)) |
void | locate (float *xx, int n, float x, int *j) |
float | midpnt (float(*func)(float), float a, float b, int n) |
void | mnbrak (float *ax, float *bx, float *cx, float *fa, float *fb, float *fc, float(*func)(float)) |
float | poidev (float xm, int *idum) |
void | polcoe (float *x, float *y, int n, float *cof) |
void | polcof (float *xa, float *ya, int n, float *cof) |
void | polin2 (float *x1a, float *x2a, float **ya, int m, int n, float x1, float x2, float *y, float *dy) |
void | polint (float *xa, float *ya, int n, float x, float *y, float *dy) |
void | powell (float *p, float **xi, int n, float ftol, int *iter, float *fret, float(*func)(float *)) |
float | qromo (float(*func)(float), float a, float b, float(*choose)(float(*)(float), float, float, int),double EPS) |
Modified integrator for weight calculations. More... | |
float | ran1 (int *idum) |
float | ran2 (long *idum) |
void | ratint (float *xa, float *ya, int n, float x, float *y, float *dy) |
void | sort (int n, float *ra) |
void | splie2 (float *x1a, float *x2a, float **ya, int m, int n, float **y2a) |
void | splin2 (float *x1a, float *x2a, float **ya, float **y2a, int m, int n, float x1, float x2, float *y) |
void | spline (float *x, float *y, int n, float yp1, float ypn, float *y2) |
void | splint (float *xa, float *ya, float *y2a, int n, float x, float *y) |
void | svbksb (float **u, float *w, float **v, int m, int n, float *b, float *x) |
void | svdcmp (float **a, int m, int n, float *w, float **v) |
void | svdfit (float *x, float *y, float *sig, int ndata, float *a, int ma, float **u, float **v, float *w, float *chisq, void(*funcs)(float, float *, int)) |
void | svdvar (float **v, int ma, float *w, float **cvm) |
The module NR contains the set of procedures from "Numerical Recipes in C: The art of scientific programming". All the files of the used recipes are concatenated in nr.c by means of include directives. At the top of this concatenation, in this header file, we set a heading
#define float double
The memory- and error-handling utilities are given in a separate module NRUTIL.
Usage:
The memory allocation within the MASS "scientific" modules (scind, weif, scan and atmos) is done with dvector(), dmatrix() for floating point arrays; deallocation is made with respective free_dvector() and free_dmatrix(). Thus, we use explicitly the double-type arrays.
The only modified scientific recipe is the qromo() integrator which is given in qromo2.c source file to implement the relative convergence criterion. The use of all the other recipes is normal, as described in the Book. They are only modified to conform C++ conventions and return after nrerror() call.
|
All the mathematics with "float"-type is done actually in double-type in nr.c, nrutil.cpp and MASS applications |
|
Modified integrator for weight calculations.
|