写着写着就不想实现了。。。
c++吧
全部回复
仅看楼主
level 11
gameloftyou 楼主

#ifndef MATRIX_H_INCLUDED
#define MATRIX_H_INCLUDED
#include <stdexcept>
template <
class T>
class Matrix {
public:
  Matrix(
int row,
int col);
  Matrix(
const Matrix &matrix);
  
void setData(
int rownum,
int colnum);
  
bool sameModel(
const Matrix &matrix)
const;
  
bool isPhalanx()
const;
  
bool isZeroMatrix()
const;
  
bool isUnitMatrix()
const;
  
bool isQuantityMatrix()
const;
  
bool isDiagonalMatrix()
const;
  
bool isUpperTriangularMatrix()
const;
  
bool isLowerTriangularMatrix()
const;
  
bool isLadderMatrix()
const;
  
bool isSymmetricMatrix()
const;
  
bool isAntisymmetricMatrix()
const;
  
bool isInvertible()
const;
  T getData(
int rownum,
int colnum)
const;
  T getDet()
const;
  Matrix getInverseMatrix()
const;
  Matrix getTransposeMatrix()
const;
  
void inverseSelf();
  
void transposeSelf();
  Matrix &
operator=(
const Matrix &matrix);
  Matrix &
operator+=(
const Matrix &matrix);
  Matrix &
operator-=(
const Matrix &matrix);
  Matrix &
operator*=(
const Matrix &matrix);
  ~Matrix();
private:
  
int row;
  
int col;
  T *data;
};
template <
class T>
Matrix<T>
operator+(
const Matrix<T> &lmtx,
const Matrix<T> &rmtx);
template <
class T>
Matrix<T>
operator-(
const Matrix<T> &lmtx,
const Matrix<T> &rmtx);
template <
class T>
Matrix<T>
operator*(
const Matrix<T> &lmtx,
const Matrix<T> &rmtx);
#endif // MATRIX_H_INCLUDED
我是有多懒[]
2013年10月26日 15点10分 1
level 11
gameloftyou 楼主
再加上本征值,本征矢,标准型,秩这些[泪],矩阵还有哪些个操作和属性?
2013年10月26日 16点10分 2
level 8
[揉脸]线性代数。。。
2013年10月26日 16点10分 3
level 11
gameloftyou 楼主

还有个初等矩阵...
2013年10月26日 16点10分 4
1