Main Page   Namespace List   Compound List   File List   Namespace Members   Compound Members   File Members  

nrutil.h

Go to the documentation of this file.
00001 
00056 #ifndef _NRUTIL_H
00057 #define _NRUTIL_H
00058 
00059 /* Force C++ compilation of nr and nrutil modules: */
00060 #ifndef NR_CPP
00061 #define NR_CPP
00062 #endif
00063 
00064 #include <string>
00065 
00068 #define float double
00069 
00070 #ifdef __cplusplus
00071 #ifndef NR_CPP
00072 extern "C" {
00073 #else
00074 namespace nr {
00075 #endif
00076 #endif  /* of __cplusplus */
00077 
00079 const int recipes_ercode = -1 ; 
00080 
00084 int erget() ;
00085 
00089 const string& ermessage() ;
00090 
00100 const char * ercodemessage(int ercode) ;
00101 
00102 /* Error codes which scientific modules functions may set : see ercodemessage()*/
00103 const int ERLO = (0);
00104 /* Fatal errors : programming error */
00105 const int ERNUL =(-2);   
00106 const int ERMEM =(-3);   
00107 const int ERNNL =(-4);   
00108 const int ERPAR =(-5);   
00109 const int ERFATAL = ERPAR ;
00110  
00111 /* Non-fatal errors, e.g. by bad input data */
00112 const int ERFIO =(-6);   
00113 const int EROFL =(-7);   
00115 const int ERNOD =(-8);   
00116 const int ERZGR =(-9);   
00117 const int ERSPE =(-10);   
00118 const int ERGEO =(-11);  
00119 const int ERCRV =(-12);  
00120 const int ERHI =(-12);
00121 
00129 void erreset() ;
00130 
00141 void nrerror(const char * ermsg, int ercode = recipes_ercode);
00142 
00143 float *vector(int,int);
00144 float **matrix(int,int,int,int);
00145 double *dvector(int,int);
00146 double **dmatrix(int,int,int,int);
00147 int *ivector(int,int);
00148 int **imatrix(int,int,int,int);
00149 void free_vector(float*,int,int);
00150 void free_dvector(double*,int,int);
00151 void free_ivector(int*,int,int);
00152 void free_matrix(float**,int,int,int,int);
00153 void free_dmatrix(double **, int,int,int,int);
00154 void free_imatrix(int**,int,int,int,int);
00155 /* Not tested so far in C++ implementation: */
00156 float **submatrix(float**,int,int,int,int,int,int);
00157 void free_submatrix(float**,int,int,int,int);
00158 float **convert_matrix(float*,int,int,int,int);
00159 void free_convert_matrix(float**,int,int,int,int);
00160 
00161 #ifdef __cplusplus
00162 }
00163 #endif
00164 
00165 #undef float
00166 
00167 #endif

Generated on Wed Jan 16 00:40:06 2002 for MASS Software by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001