Public Member Functions | Friends
Matrix Class Reference

Base matrix class. More...

#include <matrix.hpp>

Inheritance diagram for Matrix:
CColMatrix CoordMatrix CRowMatrix

List of all members.

Public Member Functions

virtual ~Matrix ()
 Virtual destructor.
virtual int columns (void) const =0
 Returns the number of columns of the matrix.
virtual int rows (void) const =0
 Returns the number of rows of the matrix.
virtual void size (int &n, int &m) const =0
 Returns the number of rows n and the number of columns m of the matrix.
virtual void resize (int n, int m)=0
 Resizes the matrix to nn x mm.
virtual void clear (void)=0
 Clears the matrix (sets all element to zero).
double get (int i, int j) const
 Function to get a matrix element value at (i,j).
double & set (int i, int j)
 Function to get a reference to matrix element value at (i,j).
MatrixMulVec operator* (const class Vector &vec) const
 Operator for matrix-vector multiplication.
virtual void multiply_by_vector (Vector &res, const Vector &rhs) const =0
virtual void lower_unit_solve (Vector &y, const Vector &b) const =0
virtual void upper_diag_solve (Vector &x, const Vector &y) const =0

Friends

class Vector

Detailed Description

Base matrix class.

The matrix class is an abstract class designed to be used as a base class for different matrix implementations.


Constructor & Destructor Documentation

virtual Matrix::~Matrix ( ) [inline, virtual]

Virtual destructor.


Member Function Documentation

virtual void Matrix::clear ( void  ) [pure virtual]

Clears the matrix (sets all element to zero).

Implemented in CRowMatrix, CColMatrix, and CoordMatrix.

virtual int Matrix::columns ( void  ) const [pure virtual]

Returns the number of columns of the matrix.

Implemented in CRowMatrix, CColMatrix, and CoordMatrix.

double Matrix::get ( int  i,
int  j 
) const [inline]

Function to get a matrix element value at (i,j).

Reimplemented in CRowMatrix, CColMatrix, and CoordMatrix.

virtual void Matrix::lower_unit_solve ( Vector y,
const Vector b 
) const [pure virtual]

Implemented in CRowMatrix, CColMatrix, and CoordMatrix.

virtual void Matrix::multiply_by_vector ( Vector res,
const Vector rhs 
) const [pure virtual]

Implemented in CRowMatrix, CColMatrix, and CoordMatrix.

MatrixMulVec Matrix::operator* ( const class Vector vec) const

Operator for matrix-vector multiplication.

virtual void Matrix::resize ( int  n,
int  m 
) [pure virtual]

Resizes the matrix to nn x mm.

Implemented in CRowMatrix, CColMatrix, and CoordMatrix.

virtual int Matrix::rows ( void  ) const [pure virtual]

Returns the number of rows of the matrix.

Implemented in CRowMatrix, CColMatrix, and CoordMatrix.

double & Matrix::set ( int  i,
int  j 
) [inline]

Function to get a reference to matrix element value at (i,j).

Reimplemented in CRowMatrix, CColMatrix, and CoordMatrix.

virtual void Matrix::size ( int &  n,
int &  m 
) const [pure virtual]

Returns the number of rows n and the number of columns m of the matrix.

Implemented in CRowMatrix, CColMatrix, and CoordMatrix.

virtual void Matrix::upper_diag_solve ( Vector x,
const Vector y 
) const [pure virtual]

Implemented in CRowMatrix, CColMatrix, and CoordMatrix.


Friends And Related Function Documentation

friend class Vector [friend]

Reimplemented in CRowMatrix, and CColMatrix.


The documentation for this class was generated from the following file: