Add files via upload #71
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | ||
* GenericMatrix.hxx | ||
* | ||
* Created on: 13 April. 2013 | ||
* Authors: CDMATH | ||
*/ | ||
#ifndef GENERICMATRIX_HXX_ | ||
#define GENERICMATRIX_HXX_ | ||
/** | ||
* Cell class is defined by | ||
* - number of rows | ||
* - number of columns | ||
*/ | ||
#include <iostream> | ||
#include "DoubleTab.hxx" | ||
class GenericMatrix | ||
{ | ||
public: //---------------------------------------------------------------- | ||
/** | ||
* default constructor | ||
*/ | ||
GenericMatrix ( void ) ; | ||
/** | ||
* destructor | ||
*/ | ||
virtual ~GenericMatrix ( void ) ; | ||
/** | ||
* return number of rows in this matrix | ||
* @return _numberOfRows | ||
*/ | ||
int getNumberOfRows ( void ) const ; | ||
/** | ||
* return number of columns in this matrix | ||
* @return _numberOfColumns | ||
*/ | ||
int getNumberOfColumns ( void ) const ; | ||
const DoubleTab& getValues( void ) const ; | ||
DoubleTab getValues( void ) ; | ||
void setValues(const DoubleTab& values) ; | ||
virtual double operator ()( int i, int j ) const = 0; | ||
bool isSymmetric() const ; | ||
bool isSquare() const ; | ||
bool isSparseMatrix( void ) const ; | ||
int coefficient(int index) const ; | ||
void view() const ; | ||
protected: //---------------------------------------------------------------- | ||
/* | ||
* The number of rows. | ||
*/ | ||
int _numberOfRows ; | ||
/* | ||
* The number of columns. | ||
*/ | ||
int _numberOfColumns ; | ||
bool _isSparseMatrix ; | ||
DoubleTab _values ; | ||
}; | ||
#endif /* GENERICMATRIX_HXX_ */ |