⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sparsematrix.h

📁 针对有限元分析的稀疏矩阵采用一维存储时的矩阵运算编写的
💻 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 + -