User`s guide
4 Using MWArra y Classes
Example — Constructing an Empty Numeric Array Object
Create an empty scalar o f type int64:
MWNumericArray A = new MWNumericArray(MWClassID.INT64);
System.out.println("A = " + A);
When you run this example, the results are as follows:
A=[]
Constructing a Real or Com p lex Nu meric Scala r. Use this constructor
syntax to create a real scalar
MWNumericArray from a primitive Java type:
MWNumericArray(javatype realValue)
Or use this syntax to create a complex scalar MWNumericArray from a
primitive Java type:
MWNumericArray(javatype realValue, javatype imagValue)
The class ID for the returned MWNumericArray is shown in the fo llow ing table:
javatype
Input Class ID of MWNumericArra y
double MWClassID.DOUBLE
float MWClassID.SINGLE
long MWClassID.INT64
int MWClassID.INT32
short MWClassID.INT16
byte MWClassID.INT8
Exceptions
The MWNumericArray constructor throws the following exception:
ArrayStoreException
4-60