NO FRAMES

CPXcheckvals

public int CPXcheckvals(CPXCENVptr env, CPXCLPptr lp, int cnt, const int * rowind, const int * colind, const double * values)
Definition file: cplex.h

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.

Example

Consider the following call to CPXchgobj:

 status = CPXchgobj (env, lp, cnt, indices, values);

The arguments to this routine can be checked with a call to CPXcheckvals like this:

 status = CPXcheckvals (env, lp, cnt, NULL, indices, values);

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

A pointer to a CPLEX problem object as returned by CPXcreateprob.

cnt

The length of the indices and values arrays to be examined.

rowind

An array containing row indices. May be NULL.

colind

An array containing column indices. May be NULL.

values

An array of values. May be NULL.

Returns:

The routine returns zero if successful and nonzero if an error occurs.