#include class Matrix { int M, N; Vector *p; void set(int m, int n); void clear(); public: Matrix(); Matrix(int m, int n); Matrix(const Matrix &X); ~Matrix(); inline int nrow() const { return M; } inline int ncol() const { return N; } Vector dim() const; Matrix dim(int m, int n); inline Vector &operator [](int i) const { return p[i]; } Matrix operator [](const Vector &v) const; operator Vector() const; Matrix operator !() const; Matrix operator -() const; friend Matrix operator %(const Vector &u, const Vector &v); friend Matrix operator %(const Vector &v, const Matrix &X); Matrix operator %(const Vector &v) const; Matrix operator %(const Matrix &X) const; friend Matrix operator *(double x, const Matrix &X); friend Matrix operator *(const Vector &v, const Matrix &X); Matrix operator *(double x) const; Matrix operator *(const Vector &v) const; Matrix operator *(const Matrix &X) const; friend Matrix operator /(double x, const Matrix &X); friend Matrix operator /(const Vector &v, const Matrix &X); Matrix operator /(double x) const; Matrix operator /(const Vector &v) const; Matrix operator /(const Matrix &X) const; friend Matrix operator +(double x, const Matrix &X); friend Matrix operator +(const Vector &v, const Matrix &X); Matrix operator +(double x) const; Matrix operator +(const Vector &v) const; Matrix operator +(const Matrix &X) const; friend Matrix operator -(double x, const Matrix &X); friend Matrix operator -(const Vector &v, const Matrix &X); Matrix operator -(double x) const; Matrix operator -(const Vector &v) const; Matrix operator -(const Matrix &X) const; friend Matrix operator <(double x, const Matrix &X); friend Matrix operator <(const Vector &v, const Matrix &X); Matrix operator <(double x) const; Matrix operator <(const Vector &v) const; Matrix operator <(const Matrix &X) const; friend Matrix operator <=(double x, const Matrix &X); friend Matrix operator <=(const Vector &v, const Matrix &X); Matrix operator <=(double x) const; Matrix operator <=(const Vector &v) const; Matrix operator <=(const Matrix &X) const; friend Matrix operator >(double x, const Matrix &X); friend Matrix operator >(const Vector &v, const Matrix &X); Matrix operator >(double x) const; Matrix operator >(const Vector &v) const; Matrix operator >(const Matrix &X) const; friend Matrix operator >=(double x, const Matrix &X); friend Matrix operator >=(const Vector &v, const Matrix &X); Matrix operator >=(double x) const; Matrix operator >=(const Vector &v) const; Matrix operator >=(const Matrix &X) const; friend Matrix operator ==(double x, const Matrix &X); friend Matrix operator ==(const Vector &v, const Matrix &X); Matrix operator ==(double x) const; Matrix operator ==(const Vector &v) const; Matrix operator ==(const Matrix &X) const; friend Matrix operator !=(double x, const Matrix &X); friend Matrix operator !=(const Vector &v, const Matrix &X); Matrix operator !=(double x) const; Matrix operator !=(const Vector &v) const; Matrix operator !=(const Matrix &X) const; friend Matrix operator &&(double x, const Matrix &X); friend Matrix operator &&(const Vector &v, const Matrix &X); Matrix operator &&(double x) const; Matrix operator &&(const Vector &v) const; Matrix operator &&(const Matrix &X) const; friend Matrix operator ||(double x, const Matrix &X); friend Matrix operator ||(const Vector &v, const Matrix &X); Matrix operator ||(double x) const; Matrix operator ||(const Vector &v) const; Matrix operator ||(const Matrix &X) const; Matrix operator =(double x); Matrix operator =(const Vector &v); Matrix operator =(const Matrix &X); Matrix operator +=(double x); Matrix operator +=(const Vector &v); Matrix operator +=(const Matrix &X); Matrix operator -=(double x); Matrix operator -=(const Vector &v); Matrix operator -=(const Matrix &X); Matrix operator *=(double x); Matrix operator *=(const Vector &v); Matrix operator *=(const Matrix &X); Matrix operator /=(double x); Matrix operator /=(const Vector &v); Matrix operator /=(const Matrix &X); Matrix operator %=(const Vector &v); Matrix operator %=(const Matrix &X); friend ostream &operator <<(ostream &os, const Matrix &X); };