qpOASES
3.2.1
An Implementation of the Online Active Set Strategy
|
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 SparseSolver & | operator= (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) |
Default constructor.
SparseSolver::SparseSolver | ( | const SparseSolver & | rhs | ) |
SparseSolver::~SparseSolver | ( | ) | [virtual] |
Destructor.
References clear().
returnValue SparseSolver::clear | ( | ) | [protected] |
Frees all allocated memory.
References SUCCESSFUL_RETURN.
Referenced by operator=(), and ~SparseSolver().
returnValue SparseSolver::copy | ( | const SparseSolver & | rhs | ) | [protected] |
Copies all members from given rhs object.
rhs | Rhs 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().
int_t SparseSolver::getNegativeEigenvalues | ( | ) | [virtual] |
Return the number of negative eigenvalues.
Referenced by SolutionAnalysis::checkCurvatureOnStronglyActiveConstraints(), SQProblemSchur::correctInertia(), SQProblemSchur::removeBound(), SQProblemSchur::removeConstraint(), SQProblemSchur::resetSchurComplement(), SQProblemSchur::setupAuxiliaryQP(), and SQProblemSchur::setupAuxiliaryWorkingSet().
int_t SparseSolver::getRank | ( | ) | [virtual] |
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] |
returnValue SparseSolver::reset | ( | ) | [virtual] |
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.
dim | Dimension of the linear system. |
numNonzeros | Number of nonzeros in the matrix. |
airn | Row indices for each matrix entry. |
acjn | Column indices for each matrix entry. |
avals | Values 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.
dim | Dimension of the linear system. |
rhs | Values for the right hand side. |
sol | Solution of the linear system. |
Referenced by SQProblemSchur::addToSchurComplement(), and SQProblemSchur::determineStepDirection2().