| Overview | Group | Tree | Graph | Index | Concepts |
The routine CPXgetqconstr is used to access a specified
quadratic constraint on the variables of a CPLEX problem object.
The length of the arrays in which the nonzero linear and quadratic
coefficients of the constraint are to be returned must be specified.
linspace is 0 then the negative of the value
of *linsurplus_p returned indicates the length needed for the
arrays linval and rmatind.
quadspace is 0 then the negative of the value
of *quadsurplus_p returned indicates the length needed for the
arrays quadrow, quadcol and quadval.
Example
status = CPXgetqconstr (env, lp, &linnzcnt, &quadnzcnt, linind, linval,
linspace, &linsurplus, quadrow, quadcol, quadval,
quadspace, &quadsurplus, 0);
| env | A pointer to the CPLEX environment as returned by the |
| lp | A pointer to a CPLEX problem object as returned by |
| linnzcnt_p | A pointer to an integer to contain the number of linear coefficients returned; that is, the true length of the arrays |
| quadnzcnt_p | A pointer to an integer to contain the number of quadratic coefficients returned; that is, the true length of the arrays |
| linind | An array to contain the variable indices of the entries of |
| linval | An array to contain the linear coefficients of the specified constraint. May be NULL if |
| linspace | An integer indicating the length of the arrays |
| linsurplus_p | A pointer to an integer to contain the difference between |
| quadrow | An array to contain the variable indices of the entries of |
| quadcol | An array to contain the variable indices of the entries of |
| quadval | An array to contain the quadratic coefficients of the specified constraint. May be NULL if |
| quadspace | An integer indicating the length of the arrays |
| quadsurplus_p | A pointer to an integer to contain the difference between |
| which | An integer indicating which quadratic constraint to return. |
CPXERR_NEGATIVE_SURPLUS indicates that insufficient space was available in either the arrays linind and linval or quadrow, quadcol, and quadval to hold the nonzero coefficients.