Defines |
#define | float double |
Functions |
int | erget () |
| Get the code of error (0 if no) set in the module.
|
const string & | ermessage () |
| Get the message string set with the code returned by erget().
|
const char * | ercodemessage (int ercode) |
| The error message by code. More...
|
void | erreset () |
| Reset the error code. More...
|
void | nrerror (const char *ermsg, int ercode=recipes_ercode) |
| Error code and message setting. More...
|
float * | vector (int, int) |
float ** | matrix (int, int, int, int) |
double * | dvector (int, int) |
double ** | dmatrix (int, int, int, int) |
int * | ivector (int, int) |
int ** | imatrix (int, int, int, int) |
void | free_vector (float *, int, int) |
void | free_dvector (double *, int, int) |
void | free_ivector (int *, int, int) |
void | free_matrix (float **, int, int, int, int) |
void | free_dmatrix (double **, int, int, int, int) |
void | free_imatrix (int **, int, int, int, int) |
float ** | submatrix (float **, int, int, int, int, int, int) |
void | free_submatrix (float **, int, int, int, int) |
float ** | convert_matrix (float *, int, int, int, int) |
void | free_convert_matrix (float **, int, int, int, int) |
Variables |
const int | recipes_ercode = -1 |
const int | ERLO = (0) |
const int | ERNUL = (-2) |
const int | ERMEM = (-3) |
const int | ERNNL = (-4) |
const int | ERPAR = (-5) |
const int | ERFATAL = ERPAR |
const int | ERFIO = (-6) |
const int | EROFL = (-7) |
const int | ERNOD = (-8) |
const int | ERZGR = (-9) |
const int | ERSPE = (-10) |
const int | ERGEO = (-11) |
const int | ERCRV = (-12) |
const int | ERHI = (-12) |
The module implements the utilities for handling the dynamic memory storages (vectors and matrices) in the C++ style. The "new" and "delete" instructions are used instead of "malloc" as in original NR's nrutil.c. Thus, no nrerror() is called from the utilities themselves.
In addition to reimplementation of utilities, the error handling system is made with utilities nrerror() for setting and erget(), ermessage() for checking of error codes and their messages. The error codes are collected here for all the modules and made generalized in sense as much as possible. The sense of the error code may be verbalized by call to ercodemessage().
If NR_CPP macro is defined, the C-linkage conventions for NR recipes are not needed. Their source files are assumed to be converted in C++ compatible form and put in the namespace "nr", the same as one for utilities declared in this module.