Skip to content

Add files via upload #71

Add files via upload

Add files via upload #71

/*
* GenericMatrix.hxx
*
* Created on: 13 April. 2013

Check failure on line 4 in .github/workflows/defender-for-devops.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/defender-for-devops.yml

Invalid workflow file

You have an error in your yaml syntax on line 4
* 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_ */