00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #if (_MSC_VER > 1000) || defined(SGI_COMPILER)
00014 #pragma once
00015 #endif
00016
00017
00018
00019
00020
00021 #ifndef _MATRIXMN_H_
00022 #define _MATRIXMN_H_
00023
00024
00025
00026
00027 #include "SIBCMathLib.h"
00028
00029
00030
00031
00032
00034
00045 class XSICOREEXPORT CSIBCMatrixMNd
00046 {
00047
00048 public:
00049
00050
00051
00052
00053
00057 CSIBCMatrixMNd();
00058
00059
00060 ~CSIBCMatrixMNd();
00061
00062
00063
00064
00065
00076 bool SetDimensions(const int in_M, const int in_N);
00077
00084 bool Set( const CSIBCMatrixMNd& in_mat);
00085
00092 void Copy( const CSIBCMatrixMNd& in_mat);
00093
00098 CSIBCMatrixMNd& Transpose(const CSIBCMatrixMNd& in_mat);
00099
00100
00101
00102
00103
00109 int GetNbRow( void ) const;
00110
00116 int GetNbCol( void ) const;
00117
00124 double Get( const int in_nRow, const int in_nCol ) const;
00125
00126
00127
00128
00129
00137 void Set( int in_nRow, int in_nCol, const double in_dVal );
00138
00142 void SetIdentity( void );
00143
00144
00145
00146
00147
00157 CSIBCMatrixMNd& Mul( const CSIBCMatrixMNd& in_mat1, const CSIBCMatrixMNd& in_mat2 );
00158
00167 bool Mul( const CSIBCMatrixMNd& in_mat );
00168
00176 bool LeftMul( const CSIBCMatrixMNd& in_mat );
00177
00183 bool GrevilleInverse(const CSIBCMatrixMNd& in_mat);
00184
00193 bool GrevilleInverse(const CSIBCMatrixMNd& in_mat, const unsigned int in_NbRow, const unsigned int in_NbCol);
00194
00204 CSIBCMatrixMNd& Add( const CSIBCMatrixMNd& in_mat1, const CSIBCMatrixMNd& in_mat2);
00205
00215 CSIBCMatrixMNd& Sub( const CSIBCMatrixMNd& in_mat1, const CSIBCMatrixMNd& in_mat2);
00216
00225 CSIBCMatrixMNd& Add( const CSIBCMatrixMNd& in_mat );
00226
00235 CSIBCMatrixMNd& Sub( const CSIBCMatrixMNd& in_mat );
00236
00237
00238 protected:
00239
00240
00241
00242
00243
00244
00245 private:
00246
00247
00248
00249
00250
00251 void InverseVector(double *in_pdVct, double * out_pdInvVct, int in_len);
00252
00253
00254 double SumAbsVal( double *in_pdVct, int in_len);
00255
00256
00257
00258
00259
00260
00261 int m_nRow;
00262
00263
00264 int m_nCol;
00265
00266
00267 double** m_dMatrixMN;
00268
00270
00272
00273
00274 CSIBCMatrixMNd ( const CSIBCMatrixMNd& in_matrix );
00275
00276
00277 CSIBCMatrixMNd& operator =( const CSIBCMatrixMNd& in_matrix );
00278 };
00279
00280 #endif // _MATRIXMN_H_