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 const DoubleTab& getValues( void ) const ;
50 DoubleTab getValues( void ) ;
52 void setValues(const DoubleTab& values) ;
54 virtual double operator ()( int i, int j ) const = 0;
60 virtual bool isSymmetric(double tol=1e-6) const ;
62 bool isSquare() const ;
64 bool isSparseMatrix( void ) const ;
66 virtual bool containsPetscMatrix() const { return false; };
68 int coefficient(int index) const ;
72 protected: //----------------------------------------------------------------
80 * The number of columns.
82 int _numberOfColumns ;
84 bool _isSparseMatrix ;
89 #endif /* GENERICMATRIX_HXX_ */