Go to the documentation of this file.00001 #ifndef __NEW_MAT_MATRIX_H__
00002 #define __NEW_MAT_MATRIX_H__
00003
00004
00006 class Matrix : public GeneralMatrix
00007 {
00008 GeneralMatrix* Image() const;
00009 public:
00010 Matrix() {}
00011 ~Matrix() {}
00012 Matrix(int, int);
00013 Matrix(const BaseMatrix&);
00014 void operator=(const BaseMatrix&);
00015 void operator=(Real f) { GeneralMatrix::operator=(f); }
00016 void operator=(const Matrix& m) { Eq(m); }
00017 MatrixType type() const;
00018 Real& operator()(int, int);
00019 Real& element(int, int);
00020 Real operator()(int, int) const;
00021 Real element(int, int) const;
00022 #ifdef SETUP_C_SUBSCRIPTS
00023 Real* operator[](int m) { return store+m*ncols_val; }
00024 const Real* operator[](int m) const { return store+m*ncols_val; }
00025
00026 Matrix(Real, int, int);
00027 Matrix(const Real*, int, int);
00028 #endif
00029 Matrix(const Matrix& gm) : GeneralMatrix() { GetMatrix(&gm); }
00030 GeneralMatrix* MakeSolver();
00031 Real trace() const;
00032 void GetRow(MatrixRowCol&);
00033 void GetCol(MatrixRowCol&);
00034 void GetCol(MatrixColX&);
00035 void RestoreCol(MatrixRowCol&);
00036 void RestoreCol(MatrixColX&);
00037 void NextRow(MatrixRowCol&);
00038 void NextCol(MatrixRowCol&);
00039 void NextCol(MatrixColX&);
00040 virtual void resize(int,int);
00041
00042 virtual void resize_keep(int,int);
00043 virtual void ReSize(int m, int n) { resize(m, n); }
00044 void resize(const GeneralMatrix& A);
00045 void ReSize(const GeneralMatrix& A) { resize(A); }
00046 Real maximum_absolute_value2(int& i, int& j) const;
00047 Real minimum_absolute_value2(int& i, int& j) const;
00048 Real maximum2(int& i, int& j) const;
00049 Real minimum2(int& i, int& j) const;
00050 void operator+=(const Matrix& M) { PlusEqual(M); }
00051 void operator-=(const Matrix& M) { MinusEqual(M); }
00052 void operator+=(Real f) { GeneralMatrix::Add(f); }
00053 void operator-=(Real f) { GeneralMatrix::Add(-f); }
00054 void swap(Matrix& gm) { GeneralMatrix::swap((GeneralMatrix&)gm); }
00055 friend Real dotproduct(const Matrix& A, const Matrix& B);
00056 NEW_DELETE(Matrix)
00057 };
00058
00059 #endif
00060