谁有编好的求矩阵特征值的c++程序?

来源:百度知道 编辑:UC知道 时间:2024/05/07 07:29:04
最好是用并行计算采用OpenMP的

#include<iostream.h>
#include<stdlib.h>
#include<math.h>
#include<iomanip.h>

//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//class Matrix定义矩阵类

const int Max_xy = 20; //矩阵的最大维数
class Matrix
{
private:
double data[Max_xy][Max_xy];
unsigned x, y; //x,y;
public:
Matrix(); //默认构造函数
Matrix(const Matrix &source); //拷贝构造函数
void creat(); //输入矩阵
void init();
void transpose(); //矩阵转置
void show(); //输入此矩阵
double mode() const; //求一维矩阵的长度
void check_shiduichen(); //检查是否为是对称矩阵
void creat_unit(unsigned i); //生成i行单位矩阵
void set_x(unsigned xx); //设置行数
void set_y(unsigned yy); //设置列数
unsigned get_x(); //得到行数
unsigned get_y(); //得到列数
void shucheng(double changshu); //数乘运算
void setda