User`s guide
Using Class Methods
• short[]
• byte[]
• boolean[]
• One-dimensional arrays of any subclass of java.lang.Number
• One-dimensional arrays of java.lang.Boolean
Exceptions
The newInstance method throws the following exceptions:
NegativeArraySizeException
The specified dims para m eter is negative.
ArrayStoreException
Thearraytypeisnonnumeric.
Example — Constructing a Numeric Array Object with newInstance
Construct a 3-by-6 real numeric array using the newInstance method. Note
that data in the Java array must be stored in column-wise order so that it will
be in the correct order in the final
MWNumericArray object.
int[] dims = {3, 6};
double[] Adata = { 1, 7, 13,
2, 8, 14,
3, 9, 15,
4, 10, 16,
5, 11, 17,
6, 12, 18};
MWNumericArray A =
MWNumericArray.newInstance(dims, Adata, MWClassID.DOUBLE);
System.out.println("A = " + A);
4-65