//构造矩阵类MATRIX_H #ifndef MATRIX_H #define MATRIX_H #include "Complex
h" #include class Matrix { friend ostream &operator(istream &,Matrix &);//输入矩阵元素时,列之间请以“,”隔开,行之间请以“;”隔开 friend Matrix diag(Matrix &);//提取方阵对角元素 friend Matrix con(Matrix &);//求共轭矩阵 public: Matrix(int r=0,int c=0); Matrix(const Matrix &M); ~ Matrix(); int getRow() const; int getCol() const; int getsize() const; Complex &operator()(int i,int j);//引用 const Matrix &operator=(const Matrix &);//赋值 Matrix operator==(const Matrix &) const;//判断相等,输出相同大小的矩阵 比较的两个矩阵应该行列相等 Matrix operator
=(const Matrix &) const;//判断不等,输出相同大小的矩阵 比较的两个矩阵应该行列相等 Matrix operator~ ();//矩阵转置 Matrix operator+(Matrix &);//矩阵元素相加 Matrix operator-(Matrix &);//矩阵元素相减 Matrix operator*(Matrix &);//矩阵元素相乘 Matrix operator/(Matrix &);//矩阵元素相除 Matrix operator&(Matrix &