📄 sparsematrix.h
字号:
// SparseMatrix.h: interface for the CSparseMatrix class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SPARSEMATRIX_H__ED691D40_B2A3_11D5_97B8_CCA92B7E7B70__INCLUDED_)
#define AFX_SPARSEMATRIX_H__ED691D40_B2A3_11D5_97B8_CCA92B7E7B70__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CSparseMatrix
{
public:
double & operator()(int iRow, int iCol);
void ElementBufRealloc();
void ElementBufEmpty();
bool Decomposition(int nRow);
bool LdltSolve(int nRow,double *adB);
bool LdltSolve(int nRow,CMatrix& m);
void Realloc(int nRow,unsigned long* aiDiag);
CSparseMatrix();
CSparseMatrix(int nRow,unsigned long* aiDiag);
virtual ~CSparseMatrix();
CSparseMatrix& operator =(const double dBuf);
CSparseMatrix& operator*=(const double dBuf);
CSparseMatrix& operator =(CSparseMatrix& sm);
CSparseMatrix& operator+=(CSparseMatrix& sm);
CMatrix operator*(CMatrix& m);
private:
bool m_bDecomposed,m_bElementBufEmpty;
int m_nRow;
unsigned long *m_aiDiag;
double *m_adValue;
double m_dBuf;
};
#endif // !defined(AFX_SPARSEMATRIX_H__ED691D40_B2A3_11D5_97B8_CCA92B7E7B70__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -