CPXcheckvals


Description

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.

Return Value

The routine returns a zero on success, and a nonzero if an error occurs.

Synopsis

  int CPXcheckvals (CPXCENVptr env
                    CPXCLPptr lp,
                    int cnt,
                    const int *rowind,
                    const int *colind,
                    const double *values);

Arguments

CPXCENVptr env

The pointer to the CPLEX environment as returned by CPXopenCPLEX().

CPXCLPptr lp

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

int cnt

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

const int *rowind

An array containing row indices. May be NULL.

const int *colind

An array containing column indices. May be NULL.

const double *values

An array of values. May be NULL.

Example

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);


Previous Page: CPXcheckcopysos Return to Top Next Page: CPXchgbds