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

Optimizer API for Python - Documentation - Mosek Optimizer API for Python - Documentation - Mosek

25.11.2015 Views

218 APPENDIX A. API REFERENCE A.2.25 Task.getarownumnz() nzi = Task.getarownumnz(i) Obtains the number of non-zero elements in one row of the linear constraint matrix Arguments i : int Index of the row or column. nzi : int Number of non-zeros in the ith row of A. Description: Obtains the number of non-zero elements in one row of A. A.2.26 Task.getarowslicetrip() Task.getarowslicetrip( first, last, subi, subj, val) Obtains a sequence of rows from the coefficient matrix in triplet format. Arguments first : int Index of the first row or column in the sequence. last : int Index of the last row or column in the sequence plus one. subi : int[] Constraint subscripts. subj : int[] Column subscripts. val : double[] Values. Description: Obtains a sequence of rows from A in a sparse triplet format.

A.2. CLASS TASK 219 A.2.27 Task.getaslice() Task.getaslice( accmode, first, last, ptrb, ptre, sub, val) Obtains a sequence of rows or columns from the coefficient matrix. Arguments accmode : accmode Defines whether a column slice or a row slice is requested. first : int Index of the first row or column in the sequence. last : int Index of the last row or column in the sequence plus one. ptrb : long[] ptrb[t] is an index pointing to the first element in the tth row or column obtained. ptre : long[] ptre[t] is an index pointing to the last element plus one in the tth row or column obtained. sub : int[] Contains the row or column subscripts. val : double[] Contains the coefficient values. Description: See also Obtains a sequence of rows or columns from A in sparse format. • Task.getaslicenumnz Obtains the number of non-zeros in a slice of rows or columns of the coefficient matrix. A.2.28 Task.getaslicenumnz() numnz = Task.getaslicenumnz( accmode, first, last)

218 APPENDIX A. <strong>API</strong> REFERENCE<br />

A.2.25<br />

Task.getarownumnz()<br />

nzi = Task.getarownumnz(i)<br />

Obtains the number of non-zero elements in 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 ith row of A.<br />

Description:<br />

Obtains the number of non-zero elements in one row of A.<br />

A.2.26<br />

Task.getarowslicetrip()<br />

Task.getarowslicetrip(<br />

first,<br />

last,<br />

subi,<br />

subj,<br />

val)<br />

Obtains a sequence of rows from the coefficient matrix in triplet format.<br />

Arguments<br />

first : int<br />

Index of the first row or column in the sequence.<br />

last : int<br />

Index of the last row or column in the sequence plus one.<br />

subi : int[]<br />

Constraint subscripts.<br />

subj : int[]<br />

Column subscripts.<br />

val : double[]<br />

Values.<br />

Description:<br />

Obtains a sequence of rows from A in a sparse triplet format.

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

Saved successfully!

Ooh no, something went wrong!