QSopt QSget_basis_and_row_norms_array QSopt > Callable Library > Function List
  QSopt
  Downloads
  LP Info
  Software
  Problem Formats
  Callable Library
  Overview
Function List
  Rational Solver
  Beta
  Contact Info
Purpose
Copy the basis and dual steepest-edge norms.
Synopsis
int QSget_basis_and_row_norms_array (QSprob p, char *cstat,
    char *rstat, double *rownorms)
Arguments
p a handle to an initialized problem.
cstat returns an array specifying the status of each column (variable) in the basis; this field can be NULL, if it is not NULL it should point to an array of length at least ncols, the number of columns in the problem.
rstat returns an array specifying the status of each row (constraint) in the basis; this field can be NULL, if it is not NULL it should point to an array of length at least nrows, the number of rows in the problem.
rownorms returns an array specifying the dual steepest-edge norm of each row (constraint); this field can be NULL, if it is not NULL it should point to an array of length at least nrows.
Returns
A zero value if the function terminated correctly, and a non-zero value if an error occurred.
Description

The basis information is returned in the arrays cstat and rstat, using the encoding given above in the description of QSget_basis_array; the row norms are given as floating point numbers in the array rownorms. It is important note that the row norms correspond to the particular basis, so the basis and row norms should be stored together if they are to be used in a later call to QSload_basis_and_row_norms_array.

Example
/* p is an initialized QSprob, a handle to an existing LP problem  */

int rval, ncols, nrows;
char *cstat, *rstat;
double *rownorms;

ncols = QSget_colcount (p);
nrows = QSget_rowcount (p);

cstat = (char *) malloc (ncols * sizeof (char));
rstat = (char *) malloc (nrows * sizeof (char));
rownorms = (double *) malloc (nrows * sizeof (char));

rval = QSget_basis_and_row_norms_array (p, cstat, rstat, rownorms);
if (rval) {
    fprintf (stderr,
             "Could not get the basis+norms, error code %d\n", rval);
} else {
    /* The basis and norm information is stored in the arrays. */
}

free (cstat);
free (rstat);
free (rownorms);
 
QSopt | Problem Formats | Downloads Back
Last Updated: November 2003