Initializing help system before first use

XSLPgetformula

XSLPgetformula


Purpose
Retrieve a single matrix formula as a formula split into tokens.
Synopsis
int XPRS_CC XSLPgetformula(XSLPprob Prob, int RowIndex, int Parsed, int BufferSize, int *TokenCount, int *Type, double *Value);
Arguments
Prob 
The current SLP problem.
RowIndex 
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).
BufferSize 
Maximum number of tokens to return, i.e. length of the Type and Value arrays.
TokenCount 
Number of tokens returned in Type and Value.
Type 
Integer array to hold the token types for the formula.
Value 
Double array of values corresponding to Type.
Example
The following example displays the nonlinear formula in row 2, column 3 in unparsed form:
int n, Type[10];
double Value[10];
int TokenCount;

XSLPgetformula(Prob, 2, 0, 10, &TokenCount, Type, Value);

for (n=0;Type[n] != XSLP_EOF;n++)
  printf("\nType=%-3d  Value=%lg",Type[n],Value[n]);
Further information

The Type and Value arrays are terminated by an XSLP_EOF token.


Related topics