User`s guide

Using Class Methods
Example Getting an MWArray with toArray
Create and d isplay a copy of MWArray object A:
int[][] x = (int[][]) A.toArray();
int[] dimA = A.getDimensions();
System.out.println("Matrix A is:");
for (int i = 0; i < dimA[0]; i++)
{
for (int j = 0; j < dimA[1]; j++)
System.out.print(" " + x[i][j]);
System.out.println();
}
When run, the example displays this output:
Matrix A is:
123456
789101112
13 14 15 16 17 18
Methods to Copy, Convert, and Compare MWArrays
Use these methods to copy, conv ert, and compare objects of class MWArray or
any of its child classes.
Method Description
“clone” on page
4-50
Creates and returns a deep copy of this array.
“compareTo” on
page 4-51
Compares this array with the specified array for order.
“equals” on page
4-52
Indicates whether some other array is equal to this one.
“hashCode” on
page 4-52
Returns a hash code value for the array.
4-49