4 * Created on: 13 April. 2013
8 #ifndef GENERICMATRIX_HXX_
9 #define GENERICMATRIX_HXX_
13 * GenericMatrix class is defined by
21 #include "DoubleTab.hxx"
25 public: //----------------------------------------------------------------
29 GenericMatrix ( void ) ;
34 virtual ~GenericMatrix ( void ) ;
37 * return number of rows in this matrix
38 * @return _numberOfRows
40 int getNumberOfRows ( void ) const ;
43 * return number of columns in this matrix
44 * @return _numberOfColumns
46 int getNumberOfColumns ( void ) const ;
48 virtual double operator ()( int i, int j ) const = 0;
50 //returns the array of matrix coefficients
51 virtual std::vector< double > getArray() = 0;
53 virtual bool isSymmetric(double tol=1e-6) const ;
55 bool isSquare() const ;
57 bool isSparseMatrix( void ) const ;
59 virtual bool containsPetscMatrix() const { return false; };
63 protected: //----------------------------------------------------------------
71 * The number of columns.
73 int _numberOfColumns ;
75 bool _isSparseMatrix ;
79 #endif /* GENERICMATRIX_HXX_ */