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
我是有多懒