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)

A.2. CLASS TASK 219<br />

A.2.27<br />

Task.getaslice()<br />

Task.getaslice(<br />

accmode,<br />

first,<br />

last,<br />

ptrb,<br />

ptre,<br />

sub,<br />

val)<br />

Obtains a sequence of rows or columns from the coefficient matrix.<br />

Arguments<br />

accmode : accmode<br />

Defines whether a column slice or a row slice is requested.<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 />

ptrb : long[]<br />

ptrb[t] is an index pointing to the first element in the tth row or column obtained.<br />

ptre : long[]<br />

ptre[t] is an index pointing to the last element plus one in the tth row or column obtained.<br />

sub : int[]<br />

Contains the row or column subscripts.<br />

val : double[]<br />

Contains the coefficient values.<br />

Description:<br />

See also<br />

Obtains a sequence of rows or columns from A in sparse format.<br />

• Task.getaslicenumnz Obtains the number of non-zeros in a slice of rows or columns of the<br />

coefficient matrix.<br />

A.2.28<br />

Task.getaslicenumnz()<br />

numnz = Task.getaslicenumnz(<br />

accmode,<br />

first,<br />

last)

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

Saved successfully!

Ooh no, something went wrong!