get_nameindexGets the index of a given column or row name in the lp. int get_nameindex(lprec *lp, char *name, unsigned char isrow); Return Value get_nameindex returns the index (column/row number) of the given column/row name. A return value of -1 indicates that the name does not exist. Note that the index is the original index number. So if presolve is active, it has no effect. It is the original column/row number that is returned. Parameters lp Pointer to previously created lp model. See return value of make_lp, copy_lp, read_lp, read_LP, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI name The name of the column or row for which the index (column/row number) must be retrieved. isrow Set to FALSE (0) if column information is needed and TRUE (1) if row information is needed. Remarks The get_nameindex function returns the index (column/row number) of the given column/row name.
Note that this index starts from 1. Some API routines expect zero-based indexes and thus this value must then be corrected with -1. Example
See Also make_lp, copy_lp, read_lp, read_LP, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI, set_row_name, get_row_name, get_origrow_name, set_col_name, get_col_name, get_origcol_name |