> Languages and APIs > The ILOG CPLEX Callable Library > ILOG CPLEX Programming Practices > Row and Column References |
Row and Column References |
INDEX PREVIOUS NEXT |
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 determine which changes may have been made to matrix indices in such a context. The routines CPXgetrowindex
and CPXgetcolindex
translate names to indices.
Copyright © 1987-2003 ILOG, S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |