?? lequations.h
字號:
//////////////////////////////////////////////////////////////////////
// LEquations.h
//
// 求解線性方程組的類 CLEquations 的聲明接口
//
// 周長發編制, 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
// 需要調用矩陣操作類
#include "Matrix.h"
// 類聲明
class CLEquations
{
//
// 公有接口函數
//
public:
//
// 構造與析構
//
CLEquations(); // 默認構造函數
// 指定系數和常數構造函數
CLEquations(const CMatrix& mtxCoef, const CMatrix& mtxConst);
virtual ~CLEquations(); // 析構函數
// 初始化
BOOL Init(const CMatrix& mtxCoef, const CMatrix& mtxConst);
//
// 屬性
//
CMatrix GetCoefMatrix() const; // 獲取系數矩陣
CMatrix GetConstMatrix() const; // 獲取常數矩陣
int GetNumEquations() const; // 獲取方程個數
int GetNumUnknowns() const; // 獲取未知數個數
//
// 線性方程組求解算法
//
// 全選主元高斯消去法
BOOL GetRootsetGauss(CMatrix& mtxResult);
// 全選主元高斯-約當消去法
BOOL GetRootsetGaussJordan(CMatrix& mtxResult);
// 復系數方程組的全選主元高斯消去法
BOOL GetRootsetGauss(const CMatrix& mtxCoefImag, const CMatrix& mtxConstImag, CMatrix& mtxResult, CMatrix& mtxResultImag);
// 復系數方程組的全選主元高斯-約當消去法
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);
// 病態方程組的求解
BOOL GetRootsetMorbid(CMatrix& mtxResult, int nMaxIt = 60, double eps = 0.000001);
//
// 保護性數據成員
//
protected:
CMatrix m_mtxCoef; // 系數矩陣
CMatrix m_mtxConst; // 常數矩陣
};
#endif // !defined(AFX_LEQUATIONS_H__89A63160_719C_440D_9DFC_953F79BD4C4D__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -