XSLPloadcoefs, XPRSslploadcoefs
int XPRS_CC XSLPloadcoefs(XSLPprob prob, int ncoefs, const int[] rowind, const int[] colind, const double[] factor, const int[] formulastart, int parsed, const int[] type, const double[] coef);
prob
|
The current SLP problem.
|
ncoefs
|
Number of non-linear coefficients to be loaded.
|
rowind
|
Integer array holding index of row for the coefficient.
|
colind
|
Integer array holding index of column for the coefficient.
|
factor
|
Double array holding factor by which formula is scaled. If this is
NULL, then a value of 1.0 will be used.
|
formulastart
|
Integer array of length
ncoefs+1 holding the start position in the arrays
type and
coef of the formula for the coefficients.
formulastart[ncoefs] should be set to the next position after the end of the last formula.
|
parsed
|
Integer indicating whether the token arrays are formatted as internal unparsed (
parsed=0) or internal parsed reverse Polish (
parsed=1).
|
type
|
Array of token types providing the formula for each coefficient.
|
coef
|
Array of values corresponding to the types in
type.
|
Col2 * Col3 + Col6 * Col2 ˆ2 into Row1 and
Col2 ˆ 2 into Row3.
int rowind[3], colind[3], formulastart[4], type[8]; int n, ncoefs; double coef[8]; rowind[0] = 1; colind[0] = 2; rowind[1] = 1; colind[1] = 6; rowind[2] = 3; colind[2] = 2; n = ncoefs = 0; formulastart[ncoefs++] = n; type[n] = XSLP_COL; coef[n++] = 3; type[n++] = XSLP_EOF; formulastart[ncoefs++] = n; type[n] = XSLP_COL; coef[n++] = 2; type[n] = XSLP_COL; coef[n++] = 2; type[n] = XSLP_OP; coef[n++] = XSLP_MULTIPLY; type[n++] = XSLP_EOF; formulastart[ncoefs++] = n; type[n] = XSLP_COL; coef[n++] = 2; type[n++] = XSLP_EOF; formulastart[ncoefs] = n; XSLPloadcoefs(prob, ncoefs, rowind, colind, NULL, formulastart, 1, type, coef);
The first coefficient in Row1 is in Col2 and has the formula Col3, so it represents Col2 * Col3.
The second coefficient in Row1 is in Col6 and has the formula Col2 * Col2 so it represents Col6 * Col2 ˆ2. The formulae are described as parsed (parsed=1), so the formula is written as
Col2 Col2 *
rather than the unparsed form
Col2 * Col2
The last coefficient, in Row3, is in Col2 and has the formula Col2, so it represents Col2 * Col2.
© 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.