CPXchgcoeflist


Description

The routine CPXchgcoeflist() is used to change a list of matrix coefficients of a CPLEX problem object. The list is prepared as a set of triples (i, j, value), where i is the row index, j is the column index, and value is the new value. The list may be in any order.

Return Value

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

Synopsis

  int CPXchgcoeflist (CPXCENVptr env,
                      CPXLPptr lp,
                      int numcoefs,
                      const int *rowlist,
                      const int *collist,
                      const double *vallist);

Arguments

CPXCENVptr env

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

CPXLPptr lp

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

int numcoefs

The number of coefficients to change, or, equivalently, the length of the arrays rowlist, collist, and vallist.

const int *rowlist

const int *collist

const double *vallist

Arrays of length numcoefs that describe the list of coefficients to change. The entries rowlist[k], collist[k], and vallist[k] indicate that the matrix coefficient in row rowlist[k] and column collist[k] should be changed to the value vallist[k].

Example

  status = CPXchgcoeflist (env, lp, numcoefs, rowlist, collist,
                           vallist);


Previous Page: CPXchgcoef Return to Top Next Page: CPXchgcolname