int QSadd_col (QSprob p, int cnt, int *cmatind, double *cmatval, double obj, double lower, double upper, const char *name)
/* Assume p is initialized to the problem in the QSload_prob example. */ /* Add a variable w, with an objective coefficient of 1.1, with a 2.1 */ /* in the first constraint, with a 3.0 in the second constraint, and */ /* 1.0 <= w <= 2.0. */ int rval; const char *name = "w"; int cmatind[2] = { 0, 1 }; int cmatval[2] = { 2.1, 3.0 }; rval = QSadd_col (p, 2, cmatind, cmatval, 1.1, 1.0, 2.0, name); if (rval) { fprintf (stderr, "QSadd_col failed with return code %d\n", rval); }