Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

csuCommonMatrix.h File Reference

#include "csuCommon.h"

Go to the source code of this file.

Namespaces

namespace  csu

Defines

#define ME(mat, i, j)   ( (mat)->cols[j][i] )
#define SAVE_MATRIX(mat)   saveMatrixAscii(NULL, #mat, mat, asciiFormat)


Define Documentation

#define ME mat,
i,
     ( (mat)->cols[j][i] )
 

ME (Matrix Element) is used to access a matrix element: implements dope vector expansion Remember that a matrix is stored by columns.

There are two versions of ME avaible and they are toggled with the range check definition below (MATRIX_RANGE_CHECK). When MATRIX_RANGE_CHECK is enabled it will cause a function to be called that will check that the element to be accessed is in the correct range (determined by ->row_dim and ->col_dim) if it is not a nice error message will be printed indicating file, function and line number where the error occurred and the program will exit. Range checking is great for debugging however it is also rather expensive (function call and compares) especially within the nested loops of a matrix multiply.

Matrix A; index i,j

#define SAVE_MATRIX mat       saveMatrixAscii(NULL, #mat, mat, asciiFormat)
 


Generated on Wed Apr 23 10:42:34 2003 for BioFilter by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002