77 virtual double get_check(
int i,
int j )
const = 0;
78 virtual double &set_check(
int i,
int j ) = 0;
79 virtual double get_no_check(
int i,
int j )
const = 0;
80 virtual double &set_no_check(
int i,
int j ) = 0;
98 virtual int columns(
void )
const = 0;
102 virtual int rows(
void )
const = 0;
107 virtual void size(
int &n,
int &m )
const = 0;
115 virtual void resize(
int n,
int m ) = 0;
121 virtual void clear(
void ) = 0;
129 inline double get(
int i,
int j )
const;
134 inline double &
set(
int i,
int j );
154 #ifdef SPM_RANGE_CHECK
155 return( get_check( i, j ) );
157 return( get_no_check( i, j ) );
164 #ifdef SPM_RANGE_CHECK
165 return( set_check( i, j ) );
167 return( set_no_check( i, j ) );
virtual void multiply_by_vector(Vector &res, const Vector &rhs) const =0
MatrixMulVec operator*(const class Vector &vec) const
Operator for matrix-vector multiplication.
class Vector * _vec
Pointer to vector.
Definition: matrix.hpp:59
Dense math vector class.
Definition: mvector.hpp:68
virtual void upper_diag_solve(Vector &x, const Vector &y) const =0
virtual void lower_unit_solve(Vector &y, const Vector &b) const =0
virtual void size(int &n, int &m) const =0
Returns the number of rows n and the number of columns m of the matrix.
double get(int i, int j) const
Function to get a matrix element value at (i,j).
Definition: matrix.hpp:152
virtual void clear(void)=0
Clears the matrix (sets all element to zero).
double & set(int i, int j)
Function to get a reference to matrix element value at (i,j).
Definition: matrix.hpp:162
MatrixMulVec(const Matrix &mat, const class Vector &vec)
Constructor for MMatrixMulVec with matrix mat and vector vec.
Definition: matrix.hpp:64
Base matrix class.
Definition: matrix.hpp:76
virtual ~Matrix()
Virtual destructor.
Definition: matrix.hpp:90
virtual int columns(void) const =0
Returns the number of columns of the matrix.
std::ostream & operator<<(std::ostream &os, const Color &c)
Definition: color.hpp:122
Container object for matrix-vector multiplication operation.
Definition: matrix.hpp:57
virtual void resize(int n, int m)=0
Resizes the matrix to nn x mm.
virtual int rows(void) const =0
Returns the number of rows of the matrix.
class Matrix * _mat
Pointer to matrix.
Definition: matrix.hpp:58