XPRSbtran
XPRSbtran |
Purpose
Post-multiplies a (row) vector provided by the user by the inverse of the current basis.
Synopsis
int XPRS_CC XPRSbtran(XPRSprob prob, double vec[]);
Arguments
prob
|
The current problem.
|
vec
|
Double array of length
ROWS containing the values by which the basis inverse is to be multiplied. The transformed values will also be returned in this array.
|
Related controls
Double
Tolerance on eta elements.
|
Example
Get the (unscaled) tableau row
z of constraint number
irow, assuming that all arrays have been dimensioned.
/* Minimum size of arrays: * y: nrow + ncol; * mstart: 2; * mrowind, dmatval: nrow. */ /* set up the unit vector y to pick out row irow */ for(i = 0; i < nrow; i++) y[i] = 0.0; y[irow] = 1.0; rc = XPRSbtran(prob,y); /* y = e*B^{-1} */ /* Form z = y * A */ for(j = 0; j < ncol, j++) { rc = XPRSgetcols(prob, mstart, mrowind, dmatval, nrow, &nelt, j, j); for(d = 0.0, ielt = 0, ielt < nelt; ielt++) d += y[mrowind[ielt]] * dmatval[ielt]; y[nrow + j] = d; }
Further information
If the matrix is in a presolved state,
XPRSbtran works with the basis for the presolved problem.
Related topics