CPXXcheckcopyqpsep and CPXcheckcopyqpsep

Checks the data when the quadratic objective matrix Q for a separable QP problem is copied.

Signature


CPXCHECKLIBAPI
int CPXPUBLIC CPXXcheckcopyqpsep (CPXCENVptr env, 
                                  CPXCLPptr lp,
                                  const double *qsepvec);
    

CPXCHECKLIBAPI
int CPXPUBLIC CPXcheckcopyqpsep (CPXCENVptr env, 
                                 CPXCLPptr lp,
                                 const double *qsepvec);
    

Description

This routine validates the arguments of the corresponding routine CPXXcopyqpsep and CPXcopyqpsep. In other words, this routine checks the data when CPXXcopyqpsep and CPXcopyqpsep copies the quadratic objective matrix Q for a a separable quadratic program (QP).

The source code of this data checking routine is in the file check.c, provided as part of the product.

To call this routine, you must compile and link check.c with your program as you compile and link with the CPLEX Callable Library.

Arguments

The arguments of this routine are the same as those of CPXXcopyqpsep and CPXcopyqpsep. The second argument, lp, is technically a pointer to a constant LP object of type CPXCLPptr rather than type CPXLPptr, because this routine does not modify the problem. For most user applications, this distinction is unimportant.

Name Description
env A pointer to the CPLEX environment as returned by CPXXopenCPLEX/CPXopenCPLEX.
lp A pointer to a CPLEX problem object as returned by CPXXcreateprob/CPXcreateprob.
qsepvec An array of length CPXgetnumcols(env,lp).qsepvec[0], qsepvec[1],..., qsepvec[numcols-1] should contain the quadratic coefficients of the separable quadratic objective.

Return

The routine returns nonzero if it detects an error in the data; it returns zero if it does not detect any data errors.

Example


status = CPXcheckcopyqpsep (env, lp, qsepvec);