User`s guide

4 Using MWArra y Classes
Methods to Use on Sparse MWNumericArrays
Use these methods to return information on sparse arrays of type
MWNumericArray. All are inherited from class MWArray.
Operations on sparse arrays of type
MWNumericArray are currently supported
only for the
double type.
Method Description
“newSparse” on page 4-66 Constructs a real sparse numeric matrix with
the specified number of rows and columns and
maximum nonzero e lem ents, and initializes the
array with the supplied data.
“isSparse” on page 4-55 Tests whether the array is sparse.
“columnIndex” on page
4-56
Returns an array containin g the column index
of each nonzero element in the underlying
MATLAB array.
“rowIndex” on page 4-57 Returns an array containing the row index
of each nonzero element in the underlying
MATLAB array.
“maximumNonZeros” on
page 4-57
Returns the allocated capacity of a sparse
array. If the u nderlying array is nonsparse,
this method returns the sam e value as
numberOfElements().
“numberOfNonZeros” on
page 4-58
Returns the number of nonzero elements in
a sparse array. If the underlying array is
nonsparse, this method returns the same value
as
numberOfElements().
MWNumericArray inherits all the above methods from the MWArray class.
Methods to Return Special Constant Values
Use these methods to return the values symbolized by EPS, Inf,andNaN
in MATLAB.
4-90