Eigen::QuadProgCommon Class Reference

Common method for Quadprog solver classes. More...

#include <QuadProg.h>

Inheritance diagram for Eigen::QuadProgCommon:
[legend]

Public Member Functions

EIGEN_QUADPROG_API QuadProgCommon ()
 Default constructor. More...
 
EIGEN_QUADPROG_API const VectorXi & iter () const
 Two-dimensional iteration vector. More...
 
EIGEN_QUADPROG_API int fail () const
 Failure code, 0 is success. More...
 
EIGEN_QUADPROG_API const VectorXd & result () const
 Solution found by the solver. More...
 
EIGEN_QUADPROG_API void problem (int nrvar, int nreq, int nrineq)
 Set problem dimensions. More...
 

Protected Member Functions

void fillQCBf (int nreq, int nrineq, const MatrixXd &Q, const VectorXd &C, const VectorXd &Beq, const VectorXd &Bineq, bool isDecomp)
 

Protected Attributes

MatrixXd Q_
 Cost function matrix. More...
 
VectorXd C_
 Cost function vector. More...
 
VectorXd B_
 Inequality constraint vector. More...
 
VectorXd X_
 Solution of the quadratic program. More...
 
int fail_
 Failure code, 0 is success. More...
 
VectorXi iact_
 Vector of constraints that are active in solution. More...
 
VectorXi iter_
 2x1 vector, first component gives the number of "main" iterations, the second one says how many constraints were deleted after they became active More...
 
VectorXd work_
 Working space vector with length at least \(2n+r(r+5)/2+2q+1\) where \(r=\min(n,q)\). More...
 

Detailed Description

Common method for Quadprog solver classes.

\begin{align} \underset{{x} \in \mathbb{R}^n}{\text{minimize}} & \ \frac{1}{2}{x^TQx} + {c^Tx} \nonumber \\ \text{subject to} & \ A_{eq} x = b_{eq} \\ & \ A_{ineq} x \leq b_{ineq} \end{align}

Constructor & Destructor Documentation

◆ QuadProgCommon()

EIGEN_QUADPROG_API Eigen::QuadProgCommon::QuadProgCommon ( )

Default constructor.

Member Function Documentation

◆ fail()

EIGEN_QUADPROG_API int Eigen::QuadProgCommon::fail ( ) const

Failure code, 0 is success.

◆ fillQCBf()

void Eigen::QuadProgCommon::fillQCBf ( int  nreq,
int  nrineq,
const MatrixXd &  Q,
const VectorXd &  C,
const VectorXd &  Beq,
const VectorXd &  Bineq,
bool  isDecomp 
)
protected

◆ iter()

EIGEN_QUADPROG_API const VectorXi& Eigen::QuadProgCommon::iter ( ) const

Two-dimensional iteration vector.

First component gives the number of "main" iterations, the second one says how many constraints were deleted after they became active.

◆ problem()

EIGEN_QUADPROG_API void Eigen::QuadProgCommon::problem ( int  nrvar,
int  nreq,
int  nrineq 
)

Set problem dimensions.

Parameters
nrvarDimension \(n\) of optimization vector \(x \in \mathbb{R}^n\).
nreqNumber of equality constraints, i.e. number of lines of \(A_{eq}\) and \(b_{eq}\).
nrineqNumber of inequality constraints, i.e. number of lines of \(A_{ineq}\) and \(b_{ineq}\).

◆ result()

EIGEN_QUADPROG_API const VectorXd& Eigen::QuadProgCommon::result ( ) const

Solution found by the solver.

Member Data Documentation

◆ B_

VectorXd Eigen::QuadProgCommon::B_
protected

Inequality constraint vector.

Note
ENTRIES CORRESPONDING TO EQUALITY CONSTRAINTS MAY HAVE CHANGED SIGNS ON EXIT

◆ C_

VectorXd Eigen::QuadProgCommon::C_
protected

Cost function vector.

◆ fail_

int Eigen::QuadProgCommon::fail_
protected

Failure code, 0 is success.

◆ iact_

VectorXi Eigen::QuadProgCommon::iact_
protected

Vector of constraints that are active in solution.

◆ iter_

VectorXi Eigen::QuadProgCommon::iter_
protected

2x1 vector, first component gives the number of "main" iterations, the second one says how many constraints were deleted after they became active

◆ Q_

MatrixXd Eigen::QuadProgCommon::Q_
protected

Cost function matrix.

◆ work_

VectorXd Eigen::QuadProgCommon::work_
protected

Working space vector with length at least \(2n+r(r+5)/2+2q+1\) where \(r=\min(n,q)\).

◆ X_

VectorXd Eigen::QuadProgCommon::X_
protected

Solution of the quadratic program.