XPRSgetindex
XPRSgetindex |
Purpose
Synopsis
int XPRS_CC XPRSgetindex(XPRSprob prob, int type, const char *name, int *seq);
Arguments
|
prob
|
The current problem.
|
||||
|
type
|
|
||||
|
name
|
Null terminated string.
|
||||
|
seq
|
Pointer of the integer where the row or column index number will be returned. A value of
-1 will be returned if the row or column does not exist.
|
Example
The following example loads
problem and checks to see if "
n 0203" is the name of a row or column:
int seqr, seqc;
...
XPRSreadprob(prob,"problem","");
XPRSgetindex(prob,1,"n 0203", &seqr);
XPRSgetindex(prob,2,"n 0203", &seqc);
if(seqr==-1 && seqc ==-1) printf("n 0203 not there\n");
if(seqr!= -1) printf("n 0203 is row %d\n",seqr);
if(seqc!= -1) printf"n 0203 is column %d\n",seqc);
Related topics
