The routine CPXcheckvals()
checks an array of indices and a corresponding array of values for input errors. The routine is useful for validating the arguments of problem modification routines such as CPXchgcoeflist()
, CPXchgbds()
, CPXchgobj()
, and CPXchgrhs()
. This data checking routine is found in source format in the file check.c
which is provided with the standard CPLEX distribution. To call this routine, you must compile and link check.c
with your program as well as the CPLEX Callable Library.
The routine returns a zero on success, and a nonzero if an error occurs.
int CPXcheckvals (CPXCENVptr env CPXCLPptr lp, int cnt, const int *rowind, const int *colind, const double *values); |
The pointer to the CPLEX environment as returned by CPXopenCPLEX()
.
A pointer to a CPLEX problem object as returned by CPXcreateprob()
.
The length of the indices and values arrays to be examined.
An array containing row indices. May be NULL
.
An array containing column indices. May be NULL
.
An array of values. May be NULL
.
Consider the following call to CPXchgobj()
:
status = CPXchgobj (env, lp, cnt, indices, values); |
The parameters to this routine could be checked with a call to CPXcheckvals()
as follows:
status = CPXcheckvals (env, lp, cnt, NULL, indices, values); |