Public Member Functions

Generic interface for sparse solvers to be coupled with ACADO Toolkit. More...

#include <sparse_solver.hpp>

Inheritance diagram for SparseSolver:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual SparseSolverclone () const =0
virtual returnValue getX (double *x)=0
virtual returnValue setDimension (const int &n)=0
virtual returnValue setIndices (const int *rowIdx_, const int *colIdx_)=0
virtual returnValue setMatrix (double *A_)=0
virtual returnValue setNumberOfEntries (const int &nDense_)=0
virtual returnValue setPrintLevel (PrintLevel PrintLevel_)=0
virtual returnValue setTolerance (double TOL)=0
virtual returnValue solve (double *b)=0
virtual returnValue solveTranspose (double *b)
 SparseSolver ()
virtual ~SparseSolver ()

Detailed Description

Generic interface for sparse solvers to be coupled with ACADO Toolkit.

The class SparseSolver is a generic interface for sparse solver to be coupled with ACADO Toolkit.

A SparseSolver deals with linear equations of the form

A * x = b

where A is (a possibly large but sparse) given matrix and b a given vector. Here, the non-zero elements of A need to be specified by one of the routines that are provided in this class. The aim of the sparse solver is to find the vector x, which is assumed to be uniquely defined by the above equation. For solving the linear equation the zero entries of the matrix A are used efficiently.

Author:
Boris Houska, Hans Joachim Ferreau

Definition at line 66 of file sparse_solver.hpp.


Constructor & Destructor Documentation

Default constructor.

Definition at line 47 of file sparse_solver.cpp.

Destructor.

Definition at line 52 of file sparse_solver.cpp.


Member Function Documentation

virtual SparseSolver* SparseSolver::clone ( ) const [pure virtual]
virtual returnValue SparseSolver::getX ( double *  x) [pure virtual]

Returns the solution of the equation A*x = b if solved.

Returns:
SUCCESSFUL_RETURN

Implemented in ACADOcsparse, and ConjugateGradientMethod.

virtual returnValue SparseSolver::setDimension ( const int &  n) [pure virtual]

Defines the dimension n of A R^{n n}

Returns:
SUCCESSFUL_RETURN

Implemented in ACADOcsparse, and ConjugateGradientMethod.

virtual returnValue SparseSolver::setIndices ( const int *  rowIdx_,
const int *  colIdx_ 
) [pure virtual]

Sets an index list containing the positions of the
non-zero elements in the matrix A.

Implemented in ACADOcsparse, ConjugateGradientMethod, SymmetricConjugateGradientMethod, and NormalConjugateGradientMethod.

virtual returnValue SparseSolver::setMatrix ( double *  A_) [pure virtual]

Sets the non-zero elements of the matrix A. The double* A
is assumed to contain nDense entries corresponding to
non-zero elements of A.

Implemented in ACADOcsparse, and ConjugateGradientMethod.

virtual returnValue SparseSolver::setNumberOfEntries ( const int &  nDense_) [pure virtual]

Defines the number of non-zero elements in the
matrix A

Returns:
SUCCESSFUL_RETURN

Implemented in ACADOcsparse, and ConjugateGradientMethod.

virtual returnValue SparseSolver::setPrintLevel ( PrintLevel  PrintLevel_) [pure virtual]

Sets the print level.

Returns:
SUCCESSFUL_RETURN

Implemented in ACADOcsparse, and ConjugateGradientMethod.

virtual returnValue SparseSolver::setTolerance ( double  TOL) [pure virtual]

Sets the required tolerance (accuracy) for the solution of
the linear equation. For large tolerances an iterative
algorithm might converge earlier.

Requires || A*x - b || <= TOL

The norm || . || is possibly scaled by a preconditioner.

Returns:
SUCCESSFUL_RETURN

Implemented in ACADOcsparse, and ConjugateGradientMethod.

virtual returnValue SparseSolver::solve ( double *  b) [pure virtual]

Solves the system A*x = b for the specified data.

Returns:
SUCCESSFUL_RETURN
RET_LINEAR_SYSTEM_NUMERICALLY_SINGULAR

Implemented in ACADOcsparse, and ConjugateGradientMethod.

returnValue SparseSolver::solveTranspose ( double *  b) [virtual]

Solves the system A^T*x = b for the specified data.

Returns:
SUCCESSFUL_RETURN
RET_LINEAR_SYSTEM_NUMERICALLY_SINGULAR

Reimplemented in ACADOcsparse.

Definition at line 58 of file sparse_solver.cpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 12:01:40