Functions

QuadProgPP Namespace Reference

Contains the Quadratic Programming functionality. More...

Functions

void compute_d (vnl_vector< double > &d, const vnl_matrix< double > &J, const vnl_vector< double > &np)
void update_z (vnl_vector< double > &z, const vnl_matrix< double > &J, const vnl_vector< double > &d, int iq)
void update_r (const vnl_matrix< double > &R, vnl_vector< double > &r, const vnl_vector< double > &d, int iq)
bool add_constraint (vnl_matrix< double > &R, vnl_matrix< double > &J, vnl_vector< double > &d, int &iq, double &rnorm)
void delete_constraint (vnl_matrix< double > &R, vnl_matrix< double > &J, vnl_vector< int > &A, vnl_vector< double > &u, int n, int p, int &iq, int l)
void cholesky_decomposition (vnl_matrix< double > &A)
void cholesky_solve (const vnl_matrix< double > &L, vnl_vector< double > &x, const vnl_vector< double > &b)
void forward_elimination (const vnl_matrix< double > &L, vnl_vector< double > &y, const vnl_vector< double > &b)
void backward_elimination (const vnl_matrix< double > &U, vnl_vector< double > &x, const vnl_vector< double > &y)
double dot_product (const vnl_vector< double > &x, const vnl_vector< double > &y)
double distance (double a, double b)
void print_matrix (const char *name, const vnl_matrix< double > &A, int n=-1, int m=-1)
template<typename T >
void print_vector (const char *name, const vnl_vector< T > &v, int n=-1)
double solve_quadprog (vnl_matrix< double > &G,vnl_vector< double > &g0,const vnl_matrix< double > &CE,const vnl_vector< double > &ce0,const vnl_matrix< double > &CI,const vnl_vector< double > &ci0,vnl_vector< double > &x)
 solves a problem of the form min 0.5 * x G x + g0 x : CI^T x + ci0 >= 0

Detailed Description

Contains the Quadratic Programming functionality.

The algorithm is called with the quadprog_solve() function, which implements the algorithm of Goldfarb and Idnani for the solution of a (convex) Quadratic Programming problem. by means of an active-set dual method.
The problem is in the form:
min 0.5 * x G x + g0 x, s.t. CI^T x + ci0 = 0

It was adapted from an sourceforge project, more info can be found in the file QuadProg++_vnl.h

The algorithm is called with the quadprog_solve() function, which implements the algorithm of Goldfarb and Idnani for the solution of a (convex) Quadratic Programming problem. by means of an active-set dual method.
The problem is in the form:
min 0.5 * x G x + g0 x, s.t. CI^T x + ci0 = 0

It was adapted from an sourceforge project, more info can be found in the file QuadProg++_vnl.hh


Function Documentation

double QuadProgPP::solve_quadprog ( vnl_matrix< double > &  G,
vnl_vector< double > &  g0,
const vnl_matrix< double > &  CE,
const vnl_vector< double > &  ce0,
const vnl_matrix< double > &  CI,
const vnl_vector< double > &  ci0,
vnl_vector< double > &  x 
)

solves a problem of the form min 0.5 * x G x + g0 x : CI^T x + ci0 >= 0

Parameters:
[in] g0 Vnl vector of dimension n
[in] CE Equality constraints. (just a dummy variable, equality constraints are commented out). Vnl matrix of dimension nxp.
[in] ce0 Right hand side for equality constraints. (Also just a dummy). Vnl vector of dimension p
[in] CI Inequality constraint matrix. Vnl matrix of dimension nxm
[in] ci0 Inequality constraint righthand side. Vnl vector of dimension n
[in,out] x The vector to be constrained.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Defines