XSLPgetcoef
PurposeRetrieve a single matrix coefficient as a formula split into tokensSynopsisint XPRS_CC XSLPgetcoef(XSLPprob Prob, int RowIndex, int ColIndex, double *Factor, int Parsed, int *Type, double *Value);Arguments
Prob The current SLP problem. RowIndex Integer holding the row index for the coefficient. This respects the setting of XPRS_CSTYLE. ColIndex Integer holding the column index for the coefficient. This respects the setting of XPRS_CSTYLE. Factor Address of a double precision variable to receive the value of the constant factor multiplying the formula in the coefficient. Parsed Integer indicating whether the formula of the item is to be returned in internal unparsed format (Parsed=0) or parsed (reverse Polish) format (Parsed=1). Type Integer array to hold the token types for the formula. Value Double array of values corresponding to Type.ExampleThe following example displays the formula for the coefficient in row 2, column 3 in unparsed form:int n, Type[10]; double Value[10]; XSLPgetcoef(Prob, 2, 3, &Factor, 0, Type, Value); for (n=0;Type[n] != XSLP_EOF;n++) printf("\nType=%-3d Value=%lg",Type[n],Value[n]);Further informationThe Type and Value arrays are terminated by an XSLP_EOF token.
If the requested coefficient is constant, then Factor will be set to 1.0 and the value will be returned with token type XSLP_CON.
Related topics
If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.