Initializing help system before first use

XPRSsparseftran

Purpose
Pre-multiplies a (column) vector provided by the user by the inverse of the current matrix. Sparse version of XPRSftran.
Topic areas
Synopsis
int XPRS_CC XPRSsparseftran(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 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
To get the (unscaled) tableau column of structural variable number jcol, assuming that all arrays have been dimensioned, do the following:
/* Min size of arrays: start: 2; rowind, rowcoef, val & ind: nrow. */
/* Get column as loaded originally, in sparse format */
rc = XPRSgetcols(prob, start, rowind, rowcoef, nrow, &ncoefs,
                jcol, jcol);

/* Unpack into the zeroed array */
for(i = 0; i < nrow; i++) val[i] = 0.0;
nzcoefs = 0;
for(ielt = 0; ielt < ncoefs; ielt++)
  val[ind[nzcoefs++] = rowind[ielt]] = rowcoef[ielt];

rc = XPRSsparseftran(prob, val, ind, &nzcoefs);
    
Get the (unscaled) tableau column of the slack variable for row number irow , assuming that all arrays have been dimensioned.
/* Min size of arrays: val & ind: nrow */
/* Set up the original slack column in full format */
for(i = 0; i < nrow; i++) val[i] = 0.0;
val[irow] = 1.0;
ind[0] = irow;
nzcoefs = 1;

rc = XPRSsparseftran(prob, val, ind &nzcoefs);
    
Further information
If the matrix is in a presolved state, the function will work with the basis for the presolved problem.
Related topics

© 2001-2025 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.