QSopt QSdelete_setcols QSopt > Callable Library > Function List
  QSopt
  Downloads
  LP Info
  Software
  Problem Formats
  Callable Library
  Overview
Function List
  Rational Solver
  Beta
  Contact Info
Purpose
Delete a set of columns specified by flags.
Synopsis
int QSdelete_setcols (QSprob p, int *flags)
Arguments
p a handle to an initialized problem.
flags an array of length ncols (the number of columns in the problem) specifying a 0 or 1 for each column; the columns corresponding to the 1's will be deleted.
Returns
A zero value if the function terminated correctly, and a non-zero value if an error occurred.
Description

Use this function to delete a set of variables (columns) from an existing LP problem, specifying the variables as an array of flags, with a 0 entry indicating that a variable should not be deleted and a 1 entry indicated that a variable should be deleted.

Example
/* Assume p is an initialized LP problem with 5 columns.  */
/* Use QSdelete_setcols() to remove columns 0, 2, and 4.  */

int rval;
int flags[5] = { 1, 0, 1, 0, 1 };

rval = QSdelete_setcols (p, flags);
if (rval) {
    fprintf (stderr,
             "QSdelete_setcols failed with return code %d\n", rval);
}
 
QSopt | Problem Formats | Downloads Back
Last Updated: November 2003