#include <CGAL/QP_models.h>
$$
(QP)$$  minimize$$  x^{T}Dx+c^{T}x+c_{0} 
subject to$$  Ax ~ b,  
l x u 
in $$n real variables $$x=(x_{0},...,x_{n1}). Here,
If $$D=0, the program is a linear program; if the variable bounds are $$x 0, we have a nonnegative program.
The program data are read from an input stream in MPSFormat. This is a commonly used format for encoding linear and quadratic programs that is understood by many solvers. All values are expected to be readable into type NT. The constructed program can be further manipulated by using the setmethods below.
 
The number type of the program entries.

 
reads qp from the input stream in.


 returns true if and only if an MPSencoded quadratic program could be extracted from the input stream.  

 if !qp.is_valid(), this method returns an error message explaining why the input does not conform to the MPSFormat.  

 
returns the name of the $$jth variable.
 

 
returns the index of the variable with name name. If there is no variable with this name, the result is $$1.  

 
returns the name of the $$ith constraint.
 

 
returns the index of the constraint with name name. If there is no constraint with this name, the result is $$1.  

 returns true if and only if qp is a linear program.  

 returns true if and only if qp is a nonnegative program.  

 sets the entry $$A_{ij} in column $$j and row $$i of the constraint matrix $$A of qp to val. An existing entry is overwritten. qp is enlarged if necessary to accomodate this entry.  

 sets the entry $$b_{i} of qp to val. An existing entry is overwritten. qp is enlarged if necessary to accomodate this entry.  

 
sets the entry $$ ~ _{i} of qp to rel. CGAL::SMALLER means that the $$ith constraint is of type ``$$ '', CGAL::EQUAL means ``$$='', and CGAL::LARGER encodes ``$$ ''. An existing entry is overwritten. qp is enlarged if necessary to accomodate this entry.  

 
if is_finite, this sets the entry $$l_{j} of qp to val, otherwise it sets $$l_{j} to $$ . An existing entry is overwritten. qp is enlarged if necessary to accomodate this entry.  

 
if is_finite, this sets the entry $$u_{j} of qp to val, otherwise it sets $$u_{j} to $$ . An existing entry is overwritten. qp is enlarged if necessary to accomodate this entry.  

 sets the entry $$c_{j} of qp to val. An existing entry is overwritten. qp is enlarged if necessary to accomodate this entry.  

 sets the entry $$c_{0} of qp to val. An existing entry is overwritten.  


sets the entries
$$2D_{ij} and $$2D_{ji} of qp to val. Existing entries are
overwritten. qp is enlarged if necessary to accomodate these entries.

QP_solver/first_qp_from_mps.cpp
QP_solver/first_lp_from_mps.cpp
QP_solver/first_nonnegative_qp_from_mps.cpp
QP_solver/first_nonnegative_lp_from_mps.cpp