Initializing help system before first use

XPRSgetcoltype

XPRSgetcoltype


Purpose
Returns the column types for the columns in a given range.
Synopsis
int XPRS_CC XPRSgetcoltype(XPRSprob prob, char coltype[], int first, int last);
Arguments
prob 
The current problem.
coltype 
Character array of length last-first+1 where the column types will be returned:
indicates a continuous variable;
indicates an integer variable;
indicates a binary variable;
indicates a semi-continuous variable;
indicates a semi-continuous integer variable;
indicates a partial integer variable.
first 
First column in the range.
last 
Last column in the range.
Example
This example finds the types for all columns in the matrix and prints them to the console:
int cols, i;
char *types;
...
XPRSgetintattrib(prob,XPRS_COLS,&cols);
types = (char *)malloc(sizeof(char)*cols);
XPRSgetcoltype(prob,types,0,cols-1);

for(i=0;i<cols;i++) printf("%c\n",types[i]);
Related topics