00001
00002
00012
00013
00014
00015 #if (_MSC_VER > 1000) || defined(SGI_COMPILER)
00016 #pragma once
00017 #endif
00018
00019
00020
00021
00022
00023 #ifndef _MATRIXMN_H_
00024 #define _MATRIXMN_H_
00025
00026
00027
00028
00029 #include "SIBCMathLib.h"
00030
00031
00032
00033
00034
00048 class XSICOREEXPORT CSIBCMatrixMNd
00049 {
00050
00051 public:
00052
00053
00054
00055
00056
00060 CSIBCMatrixMNd();
00061
00062
00063 ~CSIBCMatrixMNd();
00064
00065
00066
00067
00068
00079 bool SetDimensions(const int in_M, const int in_N);
00080
00087 bool Set( const CSIBCMatrixMNd& in_mat);
00088
00095 void Copy( const CSIBCMatrixMNd& in_mat);
00096
00101 CSIBCMatrixMNd& Transpose(const CSIBCMatrixMNd& in_mat);
00102
00103
00104
00105
00106
00112 int GetNbRow( void ) const;
00113
00119 int GetNbCol( void ) const;
00120
00127 double Get( const int in_nRow, const int in_nCol ) const;
00128
00129
00130
00131
00132
00140 void Set( int in_nRow, int in_nCol, const double in_dVal );
00141
00145 void SetIdentity( void );
00146
00147
00148
00149
00150
00160 CSIBCMatrixMNd& Mul( const CSIBCMatrixMNd& in_mat1, const CSIBCMatrixMNd& in_mat2 );
00161
00170 bool Mul( const CSIBCMatrixMNd& in_mat );
00171
00179 bool LeftMul( const CSIBCMatrixMNd& in_mat );
00180
00186 bool GrevilleInverse(const CSIBCMatrixMNd& in_mat);
00187
00196 bool GrevilleInverse(const CSIBCMatrixMNd& in_mat, const unsigned int in_NbRow, const unsigned int in_NbCol);
00197
00207 CSIBCMatrixMNd& Add( const CSIBCMatrixMNd& in_mat1, const CSIBCMatrixMNd& in_mat2);
00208
00218 CSIBCMatrixMNd& Sub( const CSIBCMatrixMNd& in_mat1, const CSIBCMatrixMNd& in_mat2);
00219
00228 CSIBCMatrixMNd& Add( const CSIBCMatrixMNd& in_mat );
00229
00238 CSIBCMatrixMNd& Sub( const CSIBCMatrixMNd& in_mat );
00239
00240
00241 protected:
00242
00243
00244
00245
00246
00247
00248 private:
00249
00250
00251
00252
00253
00254 void InverseVector(double *in_pdVct, double * out_pdInvVct, int in_len);
00255
00256
00257 double SumAbsVal( double *in_pdVct, int in_len);
00258
00259
00260
00261
00262
00263
00264 int m_nRow;
00265
00266
00267 int m_nCol;
00268
00269
00270 double** m_dMatrixMN;
00271
00273
00275
00276
00277 CSIBCMatrixMNd ( const CSIBCMatrixMNd& in_matrix );
00278
00279
00280 CSIBCMatrixMNd& operator =( const CSIBCMatrixMNd& in_matrix );
00281 };
00282
00283 #endif // _MATRIXMN_H_