?? eigenvaluevectorrealsymmetryjacobib.cpp
字號(hào):
//EigenvalueVectorRealSymmetryJacobiB.cpp
//實(shí)對(duì)稱陣特征值及特征向量雅可比過(guò)關(guān)法
#include <iostream> //輸入輸出流頭文件
#include "Matrix.h" //矩陣類及相關(guān)函數(shù)頭文件
#include "EigenvalueVector.h" //特征值及特征向量頭文件
using namespace std; //名字空間
void main() // 定義控制臺(tái)應(yīng)用程序的入口點(diǎn)
{
double a[5][5] =
{
{10.0, 1.0, 2.0, 3.0, 4.0},
{ 1.0, 9.0, -1.0, 2.0, -3.0},
{ 2.0, -1.0, 7.0, 3.0, -5.0},
{ 3.0, 2.0, 3.0, 12.0, -1.0},
{ 4.0, -3.0, -5.0, -1.0, 15.0}
};
matrix<double> v(5,5), da(&a[0][0],5,5);
double eps = FLOATERROR;
cout.setf(ios::fixed); //輸出數(shù)據(jù)為定點(diǎn)法
cout.precision(6); //精度6位
if(EigenvalueVectorRealSymmetryJacobiB(da,v,eps)>0)
{
cout << "MATRIX A IS: " << endl;
MatrixLinePrint(da);
cout << endl;
cout << "MATRIX V IS: " << endl;
MatrixLinePrint(v);
cout << endl;
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -