Initializing help system before first use

# XPRSsparsebtran

Purpose
Post-multiplies a (row) vector provided by the user by the inverse of the current matrix. Sparse version of XPRSbtran.
Topic areas
Linear Algebra, Simplex
Synopsis
`int XPRS_CC XPRSsparsebtran(XPRSprob prob, double val[], int ind[], int *p_ncoefs);`
Arguments

prob | The current problem.
val | Double array of length ROWS containing the values which are to be post-multiplied by the basis inverse. The transformed values are returned in this array.
ind | Integer array of indices identifying the non-zero entries of val. The indices of the non-zero entries of the transformed vector in val will be returned here. This array must be allocated to hold at least ROWS indices.
p_ncoefs | Memory location where the number of non-zero entries is given. The number of non-zero entries of the transformed vector will be returned here.

Related controls
Double

ETATOL | Tolerance on eta elements.

Example
Get the (unscaled) tableau row val of the variable basic in constraint number irow, assuming that all arrays have been dimensioned.

    /* Minimum size of arrays:
     * val: nrow + ncol;
     * start: 2;
     * ind: nrow;
     * colind, colcoef: ncol.
     */

    /* set up the unit vector y to pick out row irow */
    for(i = 0; i < nrow; i++) val[i] = 0.0;
    val[irow] = 1.0;
    ind[0] = irow;
    nzcoefs = 1;

    rc = XPRSsparsebtran(prob, val, ind, &nzcoefs);       /* y = e*B^{-1} */

    /* Form z = y * A */
    for (j = 0; j < ncol; j++) val[nrow + j] = 0.0;
    for(i = 0; i < nzcoefs; i++) {
      r = ind[i];
      rc = XPRSgetrows(prob, start, colind, colcoef, ncol, &ncoefs, r, r);
      for (j = 0; j < ncoefs; j++)
        val[nrow+colind[j]] += val[r]*colcoef[j];
    }

Further information
If the matrix is in a presolved state, the function will work with the basis for the presolved problem.
Related topics
XPRSbtran, XPRSftran, XPRSsparseftran.
Parent Topic Console and Library Functions

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.