?? jmatrix.h
字號(hào):
// JMatrix.h: interface for the JMatrix class.
//
// Lu Ying Jie
// DV Lab
//
// date notes:
// 1th edition : 2001.5
// 2th edition : 2002.7
// 3th edition : 2003.1
//
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_JMATRIX_H__C19BCFE3_D35E_4B5D_87E3_5CE922C1E0EA__INCLUDED_)
#define AFX_JMATRIX_H__C19BCFE3_D35E_4B5D_87E3_5CE922C1E0EA__INCLUDED_
class JMatrix
{
private:
unsigned int row, col ; // number of rows and columns
double * data ; // pointer to the matrix's data
public:
JMatrix( unsigned int ROW=1, unsigned int COL=1 ) ;
JMatrix( const JMatrix & A ) ;
~JMatrix() ;
public:
unsigned int DimRow( ) const ; // query
unsigned int DimCol( ) const ; // query
public:
double operator () ( unsigned int ROW, unsigned int COL ) const ;
// read only T[ROW][COL]
double * operator [] ( unsigned int ROW ) ; // read & write T[ROW]
const JMatrix operator + ( double v ) const ; // T + v
const JMatrix operator - ( double v ) const ; // T - v
const JMatrix operator * ( double v ) const ; // T * v
const JMatrix operator + ( const JMatrix & A ) const ; // T + A
const JMatrix operator - ( const JMatrix & A ) const ; // T - A
const JMatrix operator * ( const JMatrix & A ) const ; // T * A
JMatrix & operator = ( const JMatrix & A ) ; // T = A
JMatrix & operator += ( double v ) ; // T = T + v
JMatrix & operator -= ( double v ) ; // T = T - v
JMatrix & operator *= ( double v ) ; // T = T * v
JMatrix & operator += ( const JMatrix & A ) ; // T = T + A
JMatrix & operator -= ( const JMatrix & A ) ; // T = T - A
public:
JMatrix & Transpose() ;
JMatrix & Inverse( double tol=0 ) ;
JMatrix & Zero() ;
JMatrix & EqAdd( const JMatrix & A, const JMatrix & B ) ; // T = A + B
JMatrix & EqSub( const JMatrix & A, const JMatrix & B ) ; // T = A - B
JMatrix & EqMul( const JMatrix & A, const JMatrix & B ) ; // T = A * B
double NormF() const ;
double Norm1() const ;
double NormInf() const ;
int LinSol( JMatrix & B, double tol=0 ) ; // solve linear equation: A * X = B
};
#endif // !defined(AFX_JMATRIX_H__C19BCFE3_D35E_4B5D_87E3_5CE922C1E0EA__INCLUDED_)
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -