-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c83efc4
commit 7f68e3e
Showing
1 changed file
with
82 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/* | ||
* 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_ */ |