User`s guide

Using Class Methods
When run, the example displays this output:
Clone of matrix A is:
123456
7 8 9101112
13 14 15 16 17 18
compareTo. This method compares the MWArray object with the i nput object.
It returns a negative integer, ze ro,orapositiveintegerifthe
MWArray object is
less than, equal to, or greater than the specified object, respectively.
The prototype for the
compareTo method is as follow s:
public int compareTo(Object obj)
See the compareTo method in interface java.lang.Comparable for a full
description of the return value.
Input Parameters
obj
Array to compare this MWArray object to
Example Comparing MWArrays with compareTo
Create a shared copy of the MWArray object and then compare it to the original
object. A return value of zero i ndicates that the two objects a re equal:
Object S = A.sharedCopy();
if (A.compareTo(S) == 0)
System.out.println("Matrix S is equal to matrix A");
When run, the example displays this output:
Matrix S is equal to matrix A
4-51