QSopt QSdelete_cols 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 from the problem.
Synopsis
int QSdelete_cols (QSprob p, int num, int *dellist)
Arguments
p a handle to an initialized problem.
num the number of columns to be deleted.
dellist an array of length num specifying the indices of the columns to 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 from an existing LP problem, specifying the variables as a list of indices. (Note that the variables are numbered from 0 up to ncols-1, where ncols is the number of columns in the problem.)

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

int rval;
int dellist[3] = { 0, 2, 4 };

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