 YANE-Framework 1.1.0

yane::EqSys::GaussSeidel Class Reference

Class of the Jacobi Iteration Method for linear equation systems.

Inheritance diagram for yane::EqSys::GaussSeidel:
[legend]
Collaboration diagram for yane::EqSys::GaussSeidel:
[legend]

List of all members.

Public Member Functions

int dimensionColumns ()
Method to obtain the column dimension of the system matrix.
int dimensionRows ()
Method to obtain the row dimension of the system matrix.
GaussSeidel (void)
Constructor.
void initialize (double *A, int dimensionRows, int dimensionColumns, double *b, int dimensionB)
Method to initialize the linear equation problem.
void initializeLargescale (double **A, int dimensionRows, int dimensionColumns, double *b, int dimensionB)
Method to initialize the linear equation problem.
int iterationCounter (void)
void setMaxIter (int maxIter)
Method to set the maximal number of iterations.
void solve (double *x)
Method to solve the linear equation problem.
~GaussSeidel (void)
Destructor.

Protected Member Functions

double normInfinityError (double *x)
Method to compute the infinity norm error of the current iterate.

Protected Attributes

double * _A
System matrix stored by line in a large vector.
double ** _A_largescale
System matrix with double pointers for large scale matrices.
double * _b
Data vector of the problem.
int _dimensionB
Dimension of data vector.
int _dimensionColumns
Column dimension of the system matrix.
int _dimensionRows
Row dimension of the system matrix.
bool _initialized
Decision variable on initialization status of the linear equation problem.
int _iterationCounter
Iteration counter.
bool _largescale
Decision variable whether large scale solution methods shall be used.
int _maxIter
Maximal number of iterations.

Static Protected Attributes

static const double _bigbound = 1e20
Bound to stop diverging iterations.
static const double _epsilon = 1e-12
Constant to check for numerical singularity of the system matrix.

Member Function Documentation

 LIB_EXPORT int yane::EqSys::LinearEquations::dimensionColumns ( ) [inherited]

Method to obtain the column dimension of the system matrix

Returns:
Column dimension of the system matrix
 LIB_EXPORT int yane::EqSys::LinearEquations::dimensionRows ( ) [inherited]

Method to obtain the row dimension of the system matrix

Returns:
Row dimension of the system matrix
 LIB_EXPORT void yane::EqSys::LinearEquations::initialize ( double * A, int dimensionRows, int dimensionColumns, double * b, int dimensionB ) [inherited]

Method to initialize the linear equation problem

Parameters:
 A System matrix dimensionRows Row dimension of the system matrix dimensionColumns Column dimension of the system matrix b Data vector of the problem dimensionB Dimension of the data vector
Exceptions:
 ValueException is thrown if row dimension of the matrix and dimension of the data vector are not identical
 LIB_EXPORT void yane::EqSys::LinearEquations::initializeLargescale ( double ** A, int dimensionRows, int dimensionColumns, double * b, int dimensionB ) [inherited]

Method to initialize the linear equation problem

Parameters:
 A System matrix dimensionRows Row dimension of the system matrix dimensionColumns Column dimension of the system matrix b Data vector of the problem dimensionB Dimension of the data vector
Exceptions:
 ValueException is thrown if row dimension of the matrix and dimension of the data vector are not identical
 LIB_EXPORT int yane::EqSys::IterativeMethods::iterationCounter ( void ) [inherited]

Method to obtain the number of iterations used by the solution method

Parameters:
 iterationCounter
 LIB_EXPORT double yane::EqSys::IterativeMethods::normInfinityError ( double * x ) [protected, inherited]

Method to compute the infinity norm error of the current iterate

Parameters:
 x Vector of the current iterate
Returns:
Infinity norm error of the current iterate
 LIB_EXPORT void yane::EqSys::IterativeMethods::setMaxIter ( int maxIter ) [inherited]

Method to set the maximal number of iterations

Parameters:
 maxIter Maximal number of iterations
 LIB_EXPORT void yane::EqSys::GaussSeidel::solve ( double * x ) [virtual]

Method to solve the linear equation problem

Parameters:
 x Solution vector of the problem
Exceptions:
 yane::Utils::NotInitializedException is thrown if the linear equation problem has not been initialized yane::Utils::IndexException is thrown if the matrix is not quadratic yane::Utils::ValueException is thrown if the matrix is numerically not invertable of iteration diverges yane::Utils::Exception is thrown if problem neither converges nor diverges within the maximal number of iterations

Implements yane::EqSys::IterativeMethods.