Initializing help system before first use

XSLPgetformula, XPRSnlpgetformula

Purpose
Retrieve a single matrix formula as a formula split into tokens.
Synopsis
int XPRS_CC XSLPgetformula(XSLPprob prob, int row, int parsed, int maxtypes, int *p_ntypes, int[] type, double[] value);
Arguments
prob 
The current SLP problem.
row 
Integer holding the row index for the formula.
parsed 
Integer indicating whether the formula of the row is to be returned in internal unparsed format ( parsed=0) or parsed (reverse Polish) format ( parsed=1).
maxtypes 
Maximum number of tokens to return, i.e., the length of the type and value arrays.
p_ntypes 
Will be set to the length of the formula, including the XSLP_EOF token.
type 
Integer array to hold the token types for the formula. May be NULL if maxtypes is zero.
value 
Double array of values corresponding to type. May be NULL if maxtypes is zero.
Example
The following example displays the nonlinear formula in row 2, column 3 in unparsed form:
int ntypes, n;
int *type;
double *value;

XSLPgetformula(prob, 2, 0, 0, &ntypes, NULL, NULL);
type = malloc(ntypes * sizeof(int));
value = malloc(ntypes * sizeof(double));
XSLPgetformula(prob, 2, 0, 10, &ntypes, type, value);

for (n = 0; type[n] != XSLP_EOF; n++)
  printf("\nType=%-3d  value=%lg", type[n], value[n]);
Further information
1. The type and value arrays are terminated by an XSLP_EOF token.
2. If type and value are both null, the number of tokens available will be returned in p_ntypes.
3. If type or value are non-null and the number of tokens available exceeds maxtypes, an error code will be returned: this behaviour may change in a future release. To determine the number of available tokens, pass null for these arrays.
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.