DAS  3.1.6 - 18/09/2017
NRUTIL.H
Go to the documentation of this file.
1 #ifndef _NR_UTILS_H_
2 #define _NR_UTILS_H_
3 
4 static float sqrarg;
5 #define SQR(a) ((sqrarg=(a)) == 0.0 ? 0.0 : sqrarg*sqrarg)
6 
7 static double dsqrarg;
8 #define DSQR(a) ((dsqrarg=(a)) == 0.0 ? 0.0 : dsqrarg*dsqrarg)
9 
10 static double dmaxarg1,dmaxarg2;
11 #define DMAX(a,b) (dmaxarg1=(a),dmaxarg2=(b),(dmaxarg1) > (dmaxarg2) ?\
12  (dmaxarg1) : (dmaxarg2))
13 
14 static double dminarg1,dminarg2;
15 #define DMIN(a,b) (dminarg1=(a),dminarg2=(b),(dminarg1) < (dminarg2) ?\
16  (dminarg1) : (dminarg2))
17 
18 static float maxarg1,maxarg2;
19 #define FMAX(a,b) (maxarg1=(a),maxarg2=(b),(maxarg1) > (maxarg2) ?\
20  (maxarg1) : (maxarg2))
21 
22 static float minarg1,minarg2;
23 #define FMIN(a,b) (minarg1=(a),minarg2=(b),(minarg1) < (minarg2) ?\
24  (minarg1) : (minarg2))
25 
26 static long lmaxarg1,lmaxarg2;
27 #define LMAX(a,b) (lmaxarg1=(a),lmaxarg2=(b),(lmaxarg1) > (lmaxarg2) ?\
28  (lmaxarg1) : (lmaxarg2))
29 
30 static long lminarg1,lminarg2;
31 #define LMIN(a,b) (lminarg1=(a),lminarg2=(b),(lminarg1) < (lminarg2) ?\
32  (lminarg1) : (lminarg2))
33 
34 static int imaxarg1,imaxarg2;
35 #define IMAX(a,b) (imaxarg1=(a),imaxarg2=(b),(imaxarg1) > (imaxarg2) ?\
36  (imaxarg1) : (imaxarg2))
37 
38 static int iminarg1,iminarg2;
39 #define IMIN(a,b) (iminarg1=(a),iminarg2=(b),(iminarg1) < (iminarg2) ?\
40  (iminarg1) : (iminarg2))
41 
42 #define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a))
43 
44 #if defined(__STDC__) || defined(ANSI) || defined(NRANSI) /* ANSI */
45 
46 void nrerror(char error_text[]);
47 float *vector(long nl, long nh);
48 int *ivector(long nl, long nh);
49 unsigned char *cvector(long nl, long nh);
50 unsigned long *lvector(long nl, long nh);
51 double *dvector(long nl, long nh);
52 float **matrix(long nrl, long nrh, long ncl, long nch);
53 double **dmatrix(long nrl, long nrh, long ncl, long nch);
54 int **imatrix(long nrl, long nrh, long ncl, long nch);
55 float **submatrix(float **a, long oldrl, long oldrh, long oldcl, long oldch,
56  long newrl, long newcl);
57 float **convert_matrix(float *a, long nrl, long nrh, long ncl, long nch);
58 float ***f3tensor(long nrl, long nrh, long ncl, long nch, long ndl, long ndh);
59 void free_vector(float *v, long nl, long nh);
60 void free_ivector(int *v, long nl, long nh);
61 void free_cvector(unsigned char *v, long nl, long nh);
62 void free_lvector(unsigned long *v, long nl, long nh);
63 void free_dvector(double *v, long nl, long nh);
64 void free_matrix(float **m, long nrl, long nrh, long ncl, long nch);
65 void free_dmatrix(double **m, long nrl, long nrh, long ncl, long nch);
66 void free_imatrix(int **m, long nrl, long nrh, long ncl, long nch);
67 void free_submatrix(float **b, long nrl, long nrh, long ncl, long nch);
68 void free_convert_matrix(float **b, long nrl, long nrh, long ncl, long nch);
69 void free_f3tensor(float ***t, long nrl, long nrh, long ncl, long nch,
70  long ndl, long ndh);
71 
72 #else /* ANSI */
73 /* traditional - K&R */
74 
75 void nrerror();
76 float *vector();
77 float **matrix();
78 float **submatrix();
79 float **convert_matrix();
80 float ***f3tensor();
81 double *dvector();
82 double **dmatrix();
83 int *ivector();
84 int **imatrix();
85 unsigned char *cvector();
86 unsigned long *lvector();
87 void free_vector();
88 void free_dvector();
89 void free_ivector();
90 void free_cvector();
91 void free_lvector();
92 void free_matrix();
93 void free_submatrix();
94 void free_convert_matrix();
95 void free_dmatrix();
96 void free_imatrix();
97 void free_f3tensor();
98 
99 #endif /* ANSI */
100 
101 #endif /* _NR_UTILS_H_ */
void free_f3tensor()
static float sqrarg
Definition: NRUTIL.H:4
int ** imatrix()
void free_matrix()
static float minarg1
Definition: NRUTIL.H:22
void free_cvector()
static long lminarg1
Definition: NRUTIL.H:30
static double dminarg1
Definition: NRUTIL.H:14
void free_dvector()
static int iminarg1
Definition: NRUTIL.H:38
void free_lvector()
void free_dmatrix()
float * vector()
double ** dmatrix()
static float minarg2
Definition: NRUTIL.H:22
static float maxarg1
Definition: NRUTIL.H:18
static int iminarg2
Definition: NRUTIL.H:38
double * dvector()
float ** matrix()
static long lminarg2
Definition: NRUTIL.H:30
static long lmaxarg1
Definition: NRUTIL.H:26
void free_ivector()
float *** f3tensor()
void free_imatrix()
float ** submatrix()
float ** convert_matrix()
int * ivector()
static int imaxarg2
Definition: NRUTIL.H:34
unsigned char * cvector()
void free_submatrix()
static double dmaxarg1
Definition: NRUTIL.H:10
void free_vector()
static double dminarg2
Definition: NRUTIL.H:14
static double dmaxarg2
Definition: NRUTIL.H:10
static int imaxarg1
Definition: NRUTIL.H:34
unsigned long * lvector()
static double dsqrarg
Definition: NRUTIL.H:7
static long lmaxarg2
Definition: NRUTIL.H:26
void free_convert_matrix()
static float maxarg2
Definition: NRUTIL.H:18
void nrerror()
______________________________________________________________________________________
Generated on Mon Sep 18 2017 11:44:09 for DAS - Rel. 3.1.6 - 18/09/2017.