Classes and Functions used for Debugging

To catch MatrixErrors in CONICBUNDLE_DEBUG mode stop/break in CH_Matrix_Classes::MEmessage() (first routine in memarray.cxx). More...

Classes

class  CH_Matrix_Classes::MatrixError
 Such an object is generated and passed to MEmessage(), whenever an error occurs. It holds some output information on the error. More...
class  CH_Matrix_Classes::MErange
 Such an object is generated and passed to MEmessage() whenever some index is out of range. More...
class  CH_Matrix_Classes::MEmem
 Such an object is generated and passed to MEmessage() whenever a memory allocation fails. More...
class  CH_Matrix_Classes::MEdim
 Such an object is generated and passed to MEmessage() whenever matrix dimensions do not agree for a desired operation. More...

Defines

#define chk_init(x)
 CONICBUNDLE_DEBUG being undefined, the template function is removed. Otherwise it would check, whether x is initialized.
#define chk_add(x, y)
 CONICBUNDLE_DEBUG being undefined, the template function is removed. Otherwise it would check, whether matrices x and y can be added.
#define chk_rowseq(x, y)
 CONICBUNDLE_DEBUG being undefined, the template function is removed. Otherwise it would check, whether matrices x and y have the same row dimension.
#define chk_colseq(x, y)
 CONICBUNDLE_DEBUG being undefined, the template function is removed. Otherwise it would check, whether matrices x and y have the same column dimension.
#define chk_range(i, j, ubi, ubj)
 CONICBUNDLE_DEBUG being undefined, the template function is removed. Otherwise it would check, whether i and j fit into [0,ubi-1] amd [0,ubj-1] respectively.
#define chk_set_init(x, y)
 CONICBUNDLE_DEBUG being undefined, the template function is removed. Otherwise it would allow to set the initialized flag of matrix x to value y.

Enumerations

enum  CH_Matrix_Classes::Mtype {
  CH_Matrix_Classes::MTglobalfun, CH_Matrix_Classes::MTindexmatrix, CH_Matrix_Classes::MTmatrix, CH_Matrix_Classes::MTsymmetric,
  CH_Matrix_Classes::MTsparse, CH_Matrix_Classes::MTsparsesym
}
 serves for specifying the source (matrix class or function) of the error More...
enum  CH_Matrix_Classes::MEcode {
  CH_Matrix_Classes::ME_unspec, CH_Matrix_Classes::ME_range, CH_Matrix_Classes::ME_mem, CH_Matrix_Classes::ME_dim,
  CH_Matrix_Classes::ME_num, CH_Matrix_Classes::ME_warning
}
 serves for specifying the error type. More...

Functions

int CH_Matrix_Classes::MEmessage (const MatrixError &)
 displays an error message and terminates via abort() or returns 1 in case of warnings.
template<class Mat1, class Mat2>
void CH_Matrix_Classes::chk_mult (const Mat1 &, const Mat2 &, int=0, int=0)
 CONICBUNDLE_DEBUG being undefined, the template function is removed. Otherwise it would check, whether matrices x and y can be multiplied.

Detailed Description

To catch MatrixErrors in CONICBUNDLE_DEBUG mode stop/break in CH_Matrix_Classes::MEmessage() (first routine in memarray.cxx).

Implementation started before exceptions existed, so these routines where developed for error checking during development. They are only fully functioning if the code is compiled with CONICBUNDLE_DEBUG being defined. If DEBUG is undefined, no range checks or checks on consistency of dimensions are performed.


Enumeration Type Documentation

serves for specifying the error type.

Enumerator:
ME_unspec  unspecified error type, not in the list below
ME_range  error due to range check
ME_mem  error due to insufficient memory
ME_dim  error due to inconsistent dimesions
ME_num  error due to numerical reasons (e.g. division by zero)
ME_warning  no error, but a possible source of difficulties

serves for specifying the source (matrix class or function) of the error

Enumerator:
MTglobalfun  error arises in a global function
MTindexmatrix  error arises in a message of Indexmatrix
MTmatrix  error arises in a message of Matrix
MTsymmetric  error arises in a message of Symmatrix
MTsparse  error arises in a message of Sparsemat
MTsparsesym  error arises in a message of Sparsesym


Generated on Tue May 3 16:52:54 2011 for ConicBundle by  doxygen 1.5.6