User`s guide

4 Using MWArra y Classes
Input Parameters
None
Exceptions
The clone method throws the following exception:
java.lang.CloneNotSupportedException
The object’s class does not implement the Cloneable in terf ace.
Example — C loning a Numeric Array Object
Createa3-by-6arrayoftypedouble:
double[][] AData = {{ 1, 2, 3, 4, 5, 6},
{ 7, 8 , 9, 10, 11, 12},
{13, 14, 15, 16, 17, 18}};
MWNumericArray A = new MWNumericArray(AData, MWClassID.DOUBLE);
Create a clone of the MWNumericArray object A:
Object C = A.clone();
System.out.println("Clone of matrix A is:");
System.out.println(C.toString());
When run, the example displays this output:
Clone of matrix A is:
123456
7 8 9101112
13 14 15 16 17 18
compareTo. MWNumericArray inherits this method from the MWArray class.
4-88