?? lequations.h
字號:
//////////////////////////////////////////////////////////////////////
// LEquations.h
//
// 求解線性方程組的類 CLEquations 的聲明接口
//
// 周長發(fā)編制, 2002/8
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_LEQUATIONS_H__89A63160_719C_440D_9DFC_953F79BD4C4D__INCLUDED_)
#define AFX_LEQUATIONS_H__89A63160_719C_440D_9DFC_953F79BD4C4D__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// 需要調(diào)用矩陣操作類
#include "Matrix.h"
// 類聲明
class CLEquations
{
//
// 公有接口函數(shù)
//
public:
//
// 構(gòu)造與析構(gòu)
//
CLEquations(); // 默認(rèn)構(gòu)造函數(shù)
// 指定系數(shù)和常數(shù)構(gòu)造函數(shù)
CLEquations(const CMatrix& mtxCoef, const CMatrix& mtxConst);
virtual ~CLEquations(); // 析構(gòu)函數(shù)
// 初始化
BOOL Init(const CMatrix& mtxCoef, const CMatrix& mtxConst);
//
// 屬性
//
CMatrix GetCoefMatrix() const; // 獲取系數(shù)矩陣
CMatrix GetConstMatrix() const; // 獲取常數(shù)矩陣
int GetNumEquations() const; // 獲取方程個數(shù)
int GetNumUnknowns() const; // 獲取未知數(shù)個數(shù)
//
// 線性方程組求解算法
//
// 全選主元高斯消去法
BOOL GetRootsetGauss(CMatrix& mtxResult);
// 全選主元高斯-約當(dāng)消去法
BOOL GetRootsetGaussJordan(CMatrix& mtxResult);
// 復(fù)系數(shù)方程組的全選主元高斯消去法
BOOL GetRootsetGauss(const CMatrix& mtxCoefImag, const CMatrix& mtxConstImag, CMatrix& mtxResult, CMatrix& mtxResultImag);
// 復(fù)系數(shù)方程組的全選主元高斯-約當(dāng)消去法
BOOL GetRootsetGaussJordan(const CMatrix& mtxCoefImag, const CMatrix& mtxConstImag, CMatrix& mtxResult, CMatrix& mtxResultImag);
// 求解三對角線方程組的追趕法
BOOL GetRootsetTriDiagonal(CMatrix& mtxResult);
// 一般帶型方程組的求解
BOOL GetRootsetBand(int nBandWidth, CMatrix& mtxResult);
// 求解對稱方程組的分解法
BOOL GetRootsetDjn(CMatrix& mtxResult);
// 求解對稱正定方程組的平方根法
BOOL GetRootsetCholesky(CMatrix& mtxResult);
// 求解大型稀疏方程組的全選主元高斯-約去消去法
BOOL GetRootsetGgje(CMatrix& mtxResult);
// 求解托伯利茲方程組的列文遜方法
BOOL GetRootsetTlvs(CMatrix& mtxResult);
// 高斯-賽德爾迭代法
BOOL GetRootsetGaussSeidel(CMatrix& mtxResult, double eps = 0.000001);
// 求解對稱正定方程組的共軛梯度法
void GetRootsetGrad(CMatrix& mtxResult, double eps = 0.000001);
// 求解線性最小二乘問題的豪斯荷爾德變換法
BOOL GetRootsetMqr(CMatrix& mtxResult, CMatrix& mtxQ, CMatrix& mtxR);
// 求解線性最小二乘問題的廣義逆法
BOOL GetRootsetGinv(CMatrix& mtxResult, CMatrix& mtxAP, CMatrix& mtxU, CMatrix& mtxV, double eps = 0.000001);
// 病態(tài)方程組的求解
BOOL GetRootsetMorbid(CMatrix& mtxResult, int nMaxIt = 60, double eps = 0.000001);
//
// 保護(hù)性數(shù)據(jù)成員
//
protected:
CMatrix m_mtxCoef; // 系數(shù)矩陣
CMatrix m_mtxConst; // 常數(shù)矩陣
};
#endif // !defined(AFX_LEQUATIONS_H__89A63160_719C_440D_9DFC_953F79BD4C4D__INCLUDED_)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -