25.11.2015 Views

The MOSEK Python optimizer API manual Version 7.0 (Revision 141)

Optimizer API for Python - Documentation - Mosek

Optimizer API for Python - Documentation - Mosek

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A.2. CLASS TASK 217<br />

firsti : int<br />

Index of the first row in the rectangular piece.<br />

firstj : int<br />

Index of the first column in the rectangular piece.<br />

lasti : int<br />

Index of the last row plus one in the rectangular piece.<br />

lastj : int<br />

Index of the last column plus one in the rectangular piece.<br />

numnz : int<br />

Number of non-zero A elements in the rectangular piece.<br />

Description:<br />

Obtains the number non-zeros in a rectangular piece of A, i.e. the number<br />

|{(i, j) : a i,j ≠ 0, firsti ≤ i ≤ lasti − 1, firstj ≤ j ≤ lastj − 1}|<br />

where |I| means the number of elements in the set I.<br />

This function is not an efficient way to obtain the number of non-zeros in one row or column. In<br />

that case use the function Task.getarownumnz or Task.getacolnumnz.<br />

A.2.24<br />

Task.getarow()<br />

nzi = Task.getarow(<br />

i,<br />

subi,<br />

vali)<br />

Obtains one row of the linear constraint matrix.<br />

Arguments<br />

i : int<br />

Index of the row or column.<br />

nzi : int<br />

Number of non-zeros in the row obtained.<br />

subi : int[]<br />

Index of the non-zeros in the row obtained.<br />

vali : double[]<br />

Numerical values of the row obtained.<br />

Description:<br />

Obtains one row of A in a sparse format.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!