qpOASES  3.2.1
An Implementation of the Online Active Set Strategy
Public Member Functions | Protected Member Functions
SparseSolver Class Reference

Base class for linear solvers that are used in a Schur-complement implementation in qpOASES. More...

#include <SparseSolver.hpp>

List of all members.

Public Member Functions

 SparseSolver ()
 SparseSolver (const SparseSolver &rhs)
virtual ~SparseSolver ()
virtual SparseSolveroperator= (const SparseSolver &rhs)
virtual returnValue setMatrixData (int_t dim, int_t numNonzeros, const int_t *const airn, const int_t *const acjn, const real_t *const avals)=0
virtual returnValue factorize ()=0
virtual returnValue solve (int_t dim, const real_t *const rhs, real_t *const sol)=0
virtual returnValue reset ()
virtual int_t getNegativeEigenvalues ()
virtual int_t getRank ()
virtual returnValue getZeroPivots (int_t *&zeroPivots)

Protected Member Functions

returnValue clear ()
returnValue copy (const SparseSolver &rhs)

Detailed Description

Author:
Andreas Waechter, Dennis Janka
Version:
3.2
Date:
2012-2017

Constructor & Destructor Documentation

Default constructor.

Copy constructor (deep copy).

Parameters:
rhsRhs object.

References copy().

Destructor.

References clear().


Member Function Documentation

Frees all allocated memory.

Returns:
SUCCESSFUL_RETURN

References SUCCESSFUL_RETURN.

Referenced by operator=(), and ~SparseSolver().

returnValue SparseSolver::copy ( const SparseSolver rhs) [protected]

Copies all members from given rhs object.

Returns:
SUCCESSFUL_RETURN
Parameters:
rhsRhs object.

References SUCCESSFUL_RETURN.

Referenced by operator=(), and SparseSolver().

virtual returnValue SparseSolver::factorize ( ) [pure virtual]

Compute factorization of current matrix. This method must be called before solve.

Referenced by SQProblemSchur::resetSchurComplement().

Return the rank after a factorization

Referenced by SQProblemSchur::repairSingularWorkingSet().

returnValue SparseSolver::getZeroPivots ( int_t *&  zeroPivots) [virtual]

Returns the zero pivots in case the matrix is rank deficient

References SUCCESSFUL_RETURN.

Referenced by SQProblemSchur::repairSingularWorkingSet().

SparseSolver & SparseSolver::operator= ( const SparseSolver rhs) [virtual]

Assignment operator (deep copy).

Parameters:
rhsRhs object.

References clear(), and copy().

Clears all data structures.

References SUCCESSFUL_RETURN.

Referenced by SQProblemSchur::reset(), and SQProblemSchur::resetSchurComplement().

virtual returnValue SparseSolver::setMatrixData ( int_t  dim,
int_t  numNonzeros,
const int_t *const  airn,
const int_t *const  acjn,
const real_t *const  avals 
) [pure virtual]

Set new matrix data. The matrix is to be provided in the Harwell-Boeing format. Only the lower triangular part should be set.

Parameters:
dimDimension of the linear system.
numNonzerosNumber of nonzeros in the matrix.
airnRow indices for each matrix entry.
acjnColumn indices for each matrix entry.
avalsValues for each matrix entry.

Referenced by SQProblemSchur::resetSchurComplement().

virtual returnValue SparseSolver::solve ( int_t  dim,
const real_t *const  rhs,
real_t *const  sol 
) [pure virtual]

Solve linear system with most recently set matrix data.

Parameters:
dimDimension of the linear system.
rhsValues for the right hand side.
solSolution of the linear system.

Referenced by SQProblemSchur::addToSchurComplement(), and SQProblemSchur::determineStepDirection2().


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