Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "Definitions.h"
00022
00023 using namespace std;
00024
00025 #ifndef MATRIXDEALLOCATION_H
00026 #define MATRIXDEALLOCATION_H
00027
00029
00032 int MatrixDeallocation_SparseSolversFormat(unsigned int **ip2_RowIndex, unsigned int **ip2_ColumnIndex, double **dp2_JacobianValue);
00033
00035
00038 int MatrixDeallocation_RowCompressedFormat(double ***dp3_HessianValue, unsigned int i_numOfRows);
00039
00044 int MatrixDeallocation_CoordinateFormat(unsigned int **ip2_RowIndex, unsigned int **ip2_ColumnIndex, double **dp2_HessianValue);
00045
00046
00047 template<typename T>
00048 int free_2DMatrix(T **dp2_2DMatrix, unsigned int i_numOfRows) {
00049 for(unsigned int i=0; i< i_numOfRows; i++) {
00050 delete[] (dp2_2DMatrix)[i];
00051 }
00052 delete[] (dp2_2DMatrix);
00053
00054 return _TRUE;
00055 }
00056
00057 template<typename T>
00058 int free_2DMatrix(T ***dp3_2DMatrix, unsigned int i_numOfRows) {
00059 free_2DMatrix(*dp3_2DMatrix,i_numOfRows);
00060 delete dp3_2DMatrix;
00061
00062 return _TRUE;
00063 }
00064
00065 #endif