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 223<br />

A.2.33<br />

Task.getbarasparsity()<br />

numnz = Task.getbarasparsity(idxij)<br />

Obtains the sparsity pattern of the barA matrix.<br />

Arguments<br />

idxij : long[]<br />

Position of each nonzero element in the vectorized form of Ā ij . Hence, idxij[k] is the<br />

vector position of the element in row subi[k] and column subj[k] of Āij.<br />

numnz : long<br />

Number of nonzero elements in Ā.<br />

Description:<br />

<strong>The</strong> matrix Ā is assumed to be a sparse matrix of symmetric matrixes. This implies that many<br />

of elements in Ā is likely to be zero matrixes. <strong>The</strong>refore, in order to save space only nonzero<br />

elementsin Ā are stored on vectorized form. This function is used to obtain the sparsity pattern<br />

of Ā and the position of each nonzero element in the vectorized form of Ā.<br />

A.2.34<br />

Task.getbarcblocktriplet()<br />

num = Task.getbarcblocktriplet(<br />

subj,<br />

subk,<br />

subl,<br />

valijkl)<br />

Obtains barc in block triplet form.<br />

Arguments<br />

num : long<br />

Number of elements in the block triplet form.<br />

subj : int[]<br />

Symmetric matrix variable index.<br />

subk : int[]<br />

Block row index.<br />

subl : int[]<br />

Block column index.

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

Saved successfully!

Ooh no, something went wrong!