User`s guide

Using Class Methods
rowIndex. This method returns an array containing the row index of each
element in the underlying MATLAB array.
The prototype for the
rowIndex method is as follows:
public int[] rowIndex()
Input Parameters
None
Example Getting the Row Indices of a S parse MWArray
Get the row indices of the elements of the sparse array:
System.out.print("Row indices are: ");
int[] rowidx = A.rowIndex();
for(inti=0;i<5;i++)
System.out.print(rowidx[i] + " ");
System.out.println();
When run, the example displays this output:
Row indices are: 2 1 2 1 2
maximumNonZeros. This method returns the allocated capacity of a
sparse array. If the underlying array is nonsparse, this method returns the
same value as
numberOfElements.
The prototype for the
maximumNonZeros method is as follows:
public int maximumNonZeros()
Input Parameters
None
4-57