ILOG CPLEX 11.0 User's Manual > Languages and APIs > ILOG CPLEX Callable Library > ILOG CPLEX Programming Practices > Row and Column References

Consistent with standard C programming practices, in ILOG CPLEX an array containing k items will contain these items in locations 0 (zero) through k-1. Thus a linear program with m rows and n columns will have its rows indexed from 0 to m-1, and its columns from 0 to n-1.

Within the linear programming data structure, the rows and columns that represent constraints and variables are referenced by an index number. Each row and column may optionally have an associated name. If you add or delete rows, the index numbers usually change:

However, ILOG CPLEX updates the names so that each row or column index will correspond to the correct row or column name. Double checking names against index numbers is the only sure way to reveal which changes may have been made to matrix indices in such a context. The routines CPXgetrowindex and CPXgetcolindex translate names to indices.