User`s guide

4 Using MWArra y Classes
Example Getting a Boolean Value from a Logical Array
boolean[][] Adata = {{true, false, false},
{false, true, false}};
MWLogicalArray A = new MWLogicalArray(Adata);
int[] index = {2, 2};
System.out.println("A(2,2) is " + A.getBoolean(index));
When run, the example displays this output:
A(2,2) = true
set. This m ethod returns the element located at the spe cifie d one-based index
of the
MWLogicalArray object.
To set the element at a specific index, use one of the following:
public void set(int index, boolean element)
public void set(int[] index, boolean element)
Use the first syntax (int index) to return the ele ment at the specified
one-based offset in the a rray, accessing elements in column-wise order. Us e the
second syntax (
int[] index) to return the element at the specified array of
one-based indices. The first syntax offers better performance than the second.
Input Parameters
element
New element to replace at index
index
Index of the requested element in the MWLogicalArray
In the case where index is of type int, the valid range for index is 1<=index
<= N
,whereN is the total number of elements in the array.
4-102