Initializing help system before first use

XPRSnlpgetformula, XSLPgetformula

Purpose
Retrieve a single matrix formula as a formula split into tokens.
Topic area
Synopsis
int XPRSnlpgetformula(XPRSprob prob, int row, int parsed, int maxtypes, int *p_ntypes, int type[], double value[]);

int XSLPgetformula(XSLPprob prob, int row, int parsed, int maxtypes, int *p_ntypes, int type[], double value[]);
Arguments
prob 
The current 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 XPRS_TOK_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;

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

for (n = 0; type[n] != XPRS_TOK_EOF; n++)
  printf("\nType=%-3d  value=%lg", type[n], value[n]);
Further information
The type and value arrays are terminated by an XPRS_TOK_EOF token.
Related topics

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