qpOASES 3.2.1
An Implementation of the Online Active Set Strategy
Public Member Functions | Protected Member Functions | List of all members
SparseSolver Class Referenceabstract

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

#include <SparseSolver.hpp>

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

◆ SparseSolver() [1/2]

BEGIN_NAMESPACE_QPOASES SparseSolver::SparseSolver ( )

Default constructor.

◆ SparseSolver() [2/2]

SparseSolver::SparseSolver ( const SparseSolver rhs)

Copy constructor (deep copy).

Parameters
rhsRhs object.

References copy().

◆ ~SparseSolver()

SparseSolver::~SparseSolver ( )
virtual

Destructor.

References clear().

Member Function Documentation

◆ clear()

returnValue SparseSolver::clear ( )
protected

Frees all allocated memory.

Returns
SUCCESSFUL_RETURN

References SUCCESSFUL_RETURN.

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

◆ copy()

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().

◆ factorize()

virtual returnValue SparseSolver::factorize ( )
pure virtual

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

Referenced by SQProblemSchur::resetSchurComplement().

◆ getNegativeEigenvalues()

int_t SparseSolver::getNegativeEigenvalues ( )
virtual

◆ getRank()

int_t SparseSolver::getRank ( )
virtual

Return the rank after a factorization

Referenced by SQProblemSchur::repairSingularWorkingSet().

◆ getZeroPivots()

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().

◆ operator=()

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

Assignment operator (deep copy).

Parameters
rhsRhs object.

References clear(), and copy().

◆ reset()

returnValue SparseSolver::reset ( )
virtual

Clears all data structures.

References SUCCESSFUL_RETURN.

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

◆ setMatrixData()

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().

◆ solve()

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: