All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.math.array.booleanArray0D

java.lang.Object
   |
   +----com.ibm.math.array.Array
           |
           +----com.ibm.math.array.booleanArray
                   |
                   +----com.ibm.math.array.booleanArray0D

public final class booleanArray0D
extends booleanArray
booleanArray0D = 0-dimensional array of booleans

The booleanArray0D concrete class implements 0-dimensional arrays of booleans. 0-dimensional arrays can either be instantiated directly through constructors, or they can begenerated by extracting sections from other 0- or higher-dimensional arrays.


Constructor Index

 o booleanArray0D()
Create a 0-dimensional array of a certain shape.
 o booleanArray0D(boolean)
Create a 0-dimensional array, with shape and values defined by a Java boolean.
 o booleanArray0D(booleanArray0D)
Create a new 0-dimensional array as a copy of a given booleanArray0D

Method Index

 o and(boolean)
Computes, element by element, the result of: this array and scalar and return all the results in a new booleanArray0D of the same shape as this array.
 o and(boolean, booleanArray0D)
Computes, element by element, the result of: this array and scalar and return all the results in the result array.
 o and(booleanArray0D)
Computes, element by element, the result of: this array and arrayin and return all the results in a new booleanArray0D of the same shape as both arrays.
 o and(booleanArray0D, booleanArray0D)
Computes, element by element, the result of: this array and arrayin and return all the results in the result array.
 o andAssign(boolean)
and combined with assignment to this array
 o andAssign(booleanArray0D)
and combined with assignment to this array
 o assign(boolean)
Assign a scalar value to all elements of the array.
 o assign(booleanArray0D)
Assign the values from another 0-dimensional array to this array.
 o get()
Return the value of an element of the array.
 o get(int[])
Return the value of an element of the array.
 o last(int)
Return the index of the last element along its i-th axis.
 o not()
this method computes the logical not of this array and return the data in a new array
 o not(booleanArray0D)
this method computes the logical not of this array and return the data in the result parameter

 o notAssign()
this method computes the logical not of this array, element by element, and store the result of the operation in this array.
 o or(boolean)
Computes, element by element, the result of: this array or scalar and return all the results in a new booleanArray0D of the same shape as this array.
 o or(boolean, booleanArray0D)
Computes, element by element, the result of: this array or scalar and return all the results in the result array.
 o or(booleanArray0D)
Computes, element by element, the result of: this array or arrayin and return all the results in a new booleanArray0D of the same shape as both arrays.
 o or(booleanArray0D, booleanArray0D)
Computes, element by element, the result of: this array or arrayin and return all the results in the result array.
 o orAssign(boolean)
or combined with assignment to this array
 o orAssign(booleanArray0D)
or combined with assignment to this array
 o permuteAxes()
Permute the axes of this array, thus creating a reference to its (generic) transpose.
 o permuteAxes(int[])
Permute the axes of this array, thus creating a reference to its (generic) transpose.
 o rank()
Return the rank of the 0-dimensional array, 0.
 o reshape()
This method reshapes this array into an array with rank 0, each parameter gives the size in each array dimension, the array returned has a copy of the data from this array, it does not share data with this array

 o reshape(int)
This method reshapes this array into an array with rank 1, each parameter gives the size in each array dimension, the array returned has a copy of the data from this array, it does not share data with this array

 o reshape(int, int)
This method reshapes this array into an array with rank 2, each parameter gives the size in each array dimension, the array returned has a copy of the data from this array, it does not share data with this array

 o reshape(int, int, int)
This method reshapes this array into an array with rank 3, each parameter gives the size in each array dimension, the array returned has a copy of the data from this array, it does not share data with this array

 o reshape(int[])
This method is the implementation of the Array interface reshape that simply call the apropriate version of reshape given the target rank.
 o section()
Extract a 0-dimensional section from the array.
 o set(boolean)
Set the value of an element of the array.
 o set(int[], boolean)
Set the value of an element of the array.
 o shape()
Return the shape of the array as an int[] I of length 0.
 o size()
Return the number of elements in the array.
 o size(int)
Return the extent of the array along its i-th axis.
 o toJava()
Transforms this booleanArray0D to a boolean.
 o xor(boolean)
Computes, element by element, the result of: this array exclusive-or scalar and return all the results in a new booleanArray0D of the same shape as this array.
 o xor(boolean, booleanArray0D)
Computes, element by element, the result of: this array exclusive-or scalar and return all the results in the result array.
 o xor(booleanArray0D)
Computes, element by element, the result of: this array exclusive-or arrayin and return all the results in a new booleanArray0D of the same shape as both arrays.
 o xor(booleanArray0D, booleanArray0D)
Computes, element by element, the result of: this array exclusive-or arrayin and return all the results in the result array.
 o xorAssign(boolean)
xor combined with assignment to this array
 o xorAssign(booleanArray0D)
xor combined with assignment to this array

Constructors

 o booleanArray0D
 public booleanArray0D() throws InvalidArrayShapeException
Create a 0-dimensional array of a certain shape. Elements are 0-valued

Throws: InvalidArrayShapeException
all extents must be nonnegative
 o booleanArray0D
 public booleanArray0D(booleanArray0D arrayin)
Create a new 0-dimensional array as a copy of a given booleanArray0D

Parameters:
arrayin - Array to copy
 o booleanArray0D
 public booleanArray0D(boolean datain) throws InvalidArrayShapeException
Create a 0-dimensional array, with shape and values defined by a Java boolean.

Parameters:
datain - Java boolean defining shape and values of the array
Throws: InvalidArrayShapeException
The Java array must be rectangular

Methods

 o assign
 public void assign(boolean value)
Assign a scalar value to all elements of the array.

Parameters:
d - value to be assigned
 o assign
 public void assign(booleanArray0D arrayin) throws NonconformingArrayException
Assign the values from another 0-dimensional array to this array.

Parameters:
a - array with source values
Throws: NonconformingArrayException
arrays must be of same shape
 o rank
 public int rank()
Return the rank of the 0-dimensional array, 0.

Overrides:
rank in class Array
 o shape
 public int[] shape()
Return the shape of the array as an int[] I of length 0.

Overrides:
shape in class Array
 o size
 public int size()
Return the number of elements in the array.

Returns:
the total number of elements
Overrides:
size in class Array
 o size
 public int size(int i) throws InvalidArrayAxisException
Return the extent of the array along its i-th axis.

Parameters:
i - array axis (0 <= i < rank())
Returns:
the number of elements along axis i
Throws: InvalidArrayAxisException
i must be between 0 and -1
Overrides:
size in class Array
 o last
 public int last(int i) throws InvalidArrayAxisException
Return the index of the last element along its i-th axis. the value returned is simply size(i)-1, but is convenient to have such a method because last(i) is more readable than size(i)-1.

Parameters:
i - array axis (0 <= i < rank())
Returns:
the index of the last element along axis i
Throws: InvalidArrayAxisException
i must be between 0 and -1
Overrides:
last in class Array
 o permuteAxes
 public Array permuteAxes(int permarray[]) throws InvalidArrayAxisException
Permute the axes of this array, thus creating a reference to its (generic) transpose.

Parameters:
array - an array indicating the permutation to be done. ex: for a 2D array array2D.PermuteAxis({1,0}); would permute the array, but array2D.PermuteAxis({0,1}); returns the same array
Throws: InvalidArrayAxisException
0 <= a0,a1 <= 1
Overrides:
permuteAxes in class Array
 o permuteAxes
 public booleanArray0D permuteAxes() throws InvalidArrayAxisException
Permute the axes of this array, thus creating a reference to its (generic) transpose.

Throws: InvalidArrayAxisException
Axes must be in valid range and all different
 o reshape
 public Array reshape(int size[]) throws NonconformingArrayException
This method is the implementation of the Array interface reshape that simply call the apropriate version of reshape given the target rank.

Parameters:
size - size[i] is the extent of the result array along the i axis.
Throws: NonconformingArrayException
The size of the resulting array must be compatible with this array, and in the range of ranks supported by this implementation.
Overrides:
reshape in class Array
 o reshape
 public booleanArray0D reshape() throws NonconformingArrayException
This method reshapes this array into an array with rank 0, each parameter gives the size in each array dimension, the array returned has a copy of the data from this array, it does not share data with this array

Throws: NonconformingArrayException
the product of all parameters must be equal to size of this array
 o reshape
 public booleanArray1D reshape(int size0) throws NonconformingArrayException
This method reshapes this array into an array with rank 1, each parameter gives the size in each array dimension, the array returned has a copy of the data from this array, it does not share data with this array

Parameters:
size0: - extent of resulting array along axis #0
Throws: NonconformingArrayException
the product of all parameters must be equal to size of this array
 o reshape
 public booleanArray2D reshape(int size0,
                               int size1) throws NonconformingArrayException
This method reshapes this array into an array with rank 2, each parameter gives the size in each array dimension, the array returned has a copy of the data from this array, it does not share data with this array

Parameters:
size0: - extent of resulting array along axis #0
size1: - extent of resulting array along axis #1
Throws: NonconformingArrayException
the product of all parameters must be equal to size of this array
 o reshape
 public booleanArray3D reshape(int size0,
                               int size1,
                               int size2) throws NonconformingArrayException
This method reshapes this array into an array with rank 3, each parameter gives the size in each array dimension, the array returned has a copy of the data from this array, it does not share data with this array

Parameters:
size0: - extent of resulting array along axis #0
size1: - extent of resulting array along axis #1
size2: - extent of resulting array along axis #2
Throws: NonconformingArrayException
the product of all parameters must be equal to size of this array
 o section
 public booleanArray0D section() throws ArrayIndexOutOfBoundsException
Extract a 0-dimensional section from the array.

Throws: ArrayIndexOutOfBoundsException
indices must be valid
 o get
 public boolean get(int index[]) throws InvalidArrayIndexException, ArrayIndexOutOfBoundsException
Return the value of an element of the array.

Parameters:
index, - index[i] = index along i-th axis, 0 <= index[i] < size(i)
Throws: InvalidArrayIndexException
index[] must be of length 0
Overrides:
get in class booleanArray
 o get
 public boolean get() throws ArrayIndexOutOfBoundsException
Return the value of an element of the array.

 o set
 public void set(int index[],
                 boolean d) throws InvalidArrayIndexException, ArrayIndexOutOfBoundsException
Set the value of an element of the array.

Parameters:
index - index[i] = index along i-th axis, 0 <= index[i] < size(i)
d - value to which element is set
Throws: InvalidArrayIndexException
index[] must be of length 0
Overrides:
set in class booleanArray
 o set
 public void set(boolean val) throws ArrayIndexOutOfBoundsException
Set the value of an element of the array.

Parameters:
val - value to which element is set
 o and
 public booleanArray0D and(boolean scalar)
Computes, element by element, the result of: this array and scalar and return all the results in a new booleanArray0D of the same shape as this array.

Parameters:
scalar - The scalar, the second operand
 o and
 public void and(boolean scalar,
                 booleanArray0D result) throws NonconformingArrayException
Computes, element by element, the result of: this array and scalar and return all the results in the result array.

Parameters:
scalar - The scalar, the second operand
result - Boolean array to store the result of the operation
Throws: NonconformingArrayException
Shapes must match.
 o and
 public booleanArray0D and(booleanArray0D arrayin) throws NonconformingArrayException
Computes, element by element, the result of: this array and arrayin and return all the results in a new booleanArray0D of the same shape as both arrays.

Parameters:
arrayin - The array with the second operands
Throws: NonconformingArrayException
shapes must match
 o and
 public void and(booleanArray0D arrayin,
                 booleanArray0D result) throws NonconformingArrayException
Computes, element by element, the result of: this array and arrayin and return all the results in the result array.

Parameters:
arrayin - The array with the second operands
result - Boolean array to store the result of the operation
Throws: NonconformingArrayException
Shapes must match.
 o andAssign
 public booleanArray0D andAssign(boolean scalar)
and combined with assignment to this array

Parameters:
scalar - The second source operand
 o andAssign
 public booleanArray0D andAssign(booleanArray0D array) throws NonconformingArrayException
and combined with assignment to this array

Parameters:
array - The second source operand
Throws: NonconformingArrayException
shapes must match
 o or
 public booleanArray0D or(boolean scalar)
Computes, element by element, the result of: this array or scalar and return all the results in a new booleanArray0D of the same shape as this array.

Parameters:
scalar - The scalar, the second operand
 o or
 public void or(boolean scalar,
                booleanArray0D result) throws NonconformingArrayException
Computes, element by element, the result of: this array or scalar and return all the results in the result array.

Parameters:
scalar - The scalar, the second operand
result - Boolean array to store the result of the operation
Throws: NonconformingArrayException
Shapes must match.
 o or
 public booleanArray0D or(booleanArray0D arrayin) throws NonconformingArrayException
Computes, element by element, the result of: this array or arrayin and return all the results in a new booleanArray0D of the same shape as both arrays.

Parameters:
arrayin - The array with the second operands
Throws: NonconformingArrayException
shapes must match
 o or
 public void or(booleanArray0D arrayin,
                booleanArray0D result) throws NonconformingArrayException
Computes, element by element, the result of: this array or arrayin and return all the results in the result array.

Parameters:
arrayin - The array with the second operands
result - Boolean array to store the result of the operation
Throws: NonconformingArrayException
Shapes must match.
 o orAssign
 public booleanArray0D orAssign(boolean scalar)
or combined with assignment to this array

Parameters:
scalar - The second source operand
 o orAssign
 public booleanArray0D orAssign(booleanArray0D array) throws NonconformingArrayException
or combined with assignment to this array

Parameters:
array - The second source operand
Throws: NonconformingArrayException
shapes must match
 o xor
 public booleanArray0D xor(boolean scalar)
Computes, element by element, the result of: this array exclusive-or scalar and return all the results in a new booleanArray0D of the same shape as this array.

Parameters:
scalar - The scalar, the second operand
 o xor
 public void xor(boolean scalar,
                 booleanArray0D result) throws NonconformingArrayException
Computes, element by element, the result of: this array exclusive-or scalar and return all the results in the result array.

Parameters:
scalar - The scalar, the second operand
result - Boolean array to store the result of the operation
Throws: NonconformingArrayException
Shapes must match.
 o xor
 public booleanArray0D xor(booleanArray0D arrayin) throws NonconformingArrayException
Computes, element by element, the result of: this array exclusive-or arrayin and return all the results in a new booleanArray0D of the same shape as both arrays.

Parameters:
arrayin - The array with the second operands
Throws: NonconformingArrayException
shapes must match
 o xor
 public void xor(booleanArray0D arrayin,
                 booleanArray0D result) throws NonconformingArrayException
Computes, element by element, the result of: this array exclusive-or arrayin and return all the results in the result array.

Parameters:
arrayin - The array with the second operands
result - Boolean array to store the result of the operation
Throws: NonconformingArrayException
Shapes must match.
 o xorAssign
 public booleanArray0D xorAssign(boolean scalar)
xor combined with assignment to this array

Parameters:
scalar - The second source operand
 o xorAssign
 public booleanArray0D xorAssign(booleanArray0D array) throws NonconformingArrayException
xor combined with assignment to this array

Parameters:
array - The second source operand
Throws: NonconformingArrayException
shapes must match
 o not
 public void not(booleanArray0D result) throws NonconformingArrayException
this method computes the logical not of this array and return the data in the result parameter

Parameters:
result - The array that will receive the result
 o not
 public booleanArray0D not()
this method computes the logical not of this array and return the data in a new array

 o notAssign
 public booleanArray0D notAssign()
this method computes the logical not of this array, element by element, and store the result of the operation in this array.

 o toJava
 public boolean toJava()
Transforms this booleanArray0D to a boolean.


All Packages  Class Hierarchy  This Package  Previous  Next  Index