int QSchange_coef (QSprob p, int rowindex, int colindex, double coef)
Arguments
p
a handle to an initialized problem.
rowindex
the index of the row containing the coefficient.
colindex
the index of the column containing the coefficient.
coef
the new value of the coefficient.
Returns
A zero value if the function terminated correctly, and a non-zero value if an error occurred.
Description
Use this function to change a single coefficient in the constraint matrix; it can be used to modify an existing non-zero coefficient or to add a new non-zero coefficient.
Note that the function assumes that both the row and column exist; use QSadd_row or QSadd_col if the coefficient introduces a new row or column.
Example
/* Change the matrix coefficient in row 1, col 2, to 1.5 */
int rval = 0;
rval = QSchange_coef (p, 1, 2, 1.5);
if (rval) {
fprintf (stderr, "could not change coef, error code %d\n", rval);
}