1 | // Dominique YVON, CEA/DAPNIA/SPP 02/2000
|
---|
2 |
|
---|
3 | #ifndef Numrecipes_H_
|
---|
4 | #define Numrecipes_H_
|
---|
5 |
|
---|
6 | #include <math.h>
|
---|
7 | #ifdef __MWERKS__
|
---|
8 | #include "mwerksmath.h"
|
---|
9 | #include "unixmac.h"
|
---|
10 | #endif
|
---|
11 |
|
---|
12 |
|
---|
13 | /* Cree pour encapsuler les fonctions utiles de la Numerical Recipes
|
---|
14 | Actuellement encapsule: nrtil.h, hunt.c, polin2.c polint.c
|
---|
15 | */
|
---|
16 |
|
---|
17 | class NumRecipes{
|
---|
18 | public:
|
---|
19 | NumRecipes() {}
|
---|
20 | ~NumRecipes() {}
|
---|
21 | void nrerror(char error_text[]);
|
---|
22 | float *vector(long nl, long nh);
|
---|
23 | int *ivector(long nl, long nh);
|
---|
24 | unsigned char *cvector(long nl, long nh);
|
---|
25 | unsigned long *lvector(long nl, long nh);
|
---|
26 | double *dvector(long nl, long nh);
|
---|
27 | float **matrix(long nrl, long nrh, long ncl, long nch);
|
---|
28 | double **dmatrix(long nrl, long nrh, long ncl, long nch);
|
---|
29 | int **imatrix(long nrl, long nrh, long ncl, long nch);
|
---|
30 | float **submatrix(float **a, long oldrl, long oldrh, long oldcl, long oldch,
|
---|
31 | long newrl, long newcl);
|
---|
32 | float **convert_matrix(float *a, long nrl, long nrh, long ncl, long nch);
|
---|
33 | float ***f3tensor(long nrl, long nrh, long ncl, long nch, long ndl, long ndh);
|
---|
34 | void free_vector(float *v, long nl, long nh);
|
---|
35 | void free_ivector(int *v, long nl, long nh);
|
---|
36 | void free_cvector(unsigned char *v, long nl, long nh);
|
---|
37 | void free_lvector(unsigned long *v, long nl, long nh);
|
---|
38 | void free_dvector(double *v, long nl, long nh);
|
---|
39 | void free_matrix(float **m, long nrl, long nrh, long ncl, long nch);
|
---|
40 | void free_dmatrix(double **m, long nrl, long nrh, long ncl, long nch);
|
---|
41 | void free_imatrix(int **m, long nrl, long nrh, long ncl, long nch);
|
---|
42 | void free_submatrix(float **b, long nrl, long nrh, long ncl, long nch);
|
---|
43 | void free_convert_matrix(float **b, long nrl, long nrh, long ncl, long nch);
|
---|
44 | void free_f3tensor(float ***t, long nrl, long nrh, long ncl, long nch,
|
---|
45 | long ndl, long ndh);
|
---|
46 |
|
---|
47 | void hunt(float xx[], unsigned long n, float x, unsigned long *jlo);
|
---|
48 | void polin2(float *xx,float *yy, float** yaa,int,int,float,float,float*,float*);
|
---|
49 | void polint(float xa[], float ya[], int n, float x, float *y, float *dy);
|
---|
50 | };
|
---|
51 |
|
---|
52 | #endif |
---|