Returns rows in a sparse matrix representation.

Namespace: ILOG.Concert
Assembly: ILOG.CPLEX (in ILOG.CPLEX.dll) Version: 22.1.1.0

Syntax

C#
void GetRows(
	int start,
	int num,
	double[] lb,
	double[] ub,
	int[][] ind,
	double[][] val
)
Visual Basic
Sub GetRows ( _
	start As Integer, _
	num As Integer, _
	lb As Double(), _
	ub As Double(), _
	ind As Integer()(), _
	val As Double()() _
)

Parameters

start
Type: System..::..Int32
The index of the first row being queried.
num
Type: System..::..Int32
The number of consecutive rows being queried.
lb
Type: array<System..::..Double>[]()[][]
An array where to copy the lower bound values for the range constraints corresponding to the queried rows. The lower bound of the range corresponding to row begin+i will be returned as lb[i]. This array must be allocated at least length num.
ub
Type: array<System..::..Double>[]()[][]
An array where to copy the upper bound values for the range constraints corresponding to the queried rows. The upper bound of the range corresponding to row begin+i will be returned as ub[i]. This array must be allocated at least length num.
ind
Type: array<array<System..::..Int32>[]()[][]>[]()[][]
An array of arrays of integers to which the column indices of the queried rows will be copied. The nonzero indices of row begin+i will be copied into an array returned as ind[i]. This array must be initialized to at least size num.
val
Type: array<array<System..::..Double>[]()[][]>[]()[][]
An array of arrays of doubles to which the nonzero coefficients of the queried rows will be copied. The nonzero values of row begin+i will be copied into an array returned as val[i]. This array must be initialized to at least size num.

Remarks

For every row, an array of column indices and an array of values is returned, corresponding to the nonzeros in the specified rows, as well as the bounds of the constraints corresponding to the queried rows. This implies that the expression of the range constraint of a queried row can be expressed as the scalar product of the values returned for the queried row and the variables corresponding to the column indices returned for the queried row.

Note that if explicit zero coefficients were submitted to the matrix then the function may return zero coefficients in val, i.E., there is no guarantee that the function prunes explicit zero coefficients.

See Also