BooleanDenseNdArray

public class BooleanDenseNdArray

Public Methods

BooleanNdArray
copyTo(NdArray<Boolean> dst)
static BooleanNdArray
create(BooleanDataBuffer buffer, Shape shape)
boolean
getBoolean(long... indices)
Returns the boolean value of the scalar found at the given coordinates.
BooleanNdArray
BooleanNdArray
setBoolean(boolean value, long... indices)
Assigns the boolean value of the scalar found at the given coordinates.
BooleanNdArray

Inherited Methods

org.tensorflow.ndarray.impl.dense.AbstractDenseNdArray
NdArraySequence<BooleanNdArray>
elements(int dimensionIdx)
boolean
equals(Object obj)
BooleanNdArray
get(long... coords)
Boolean
getObject(long... coords)
int
BooleanNdArray
read(DataBuffer<Boolean> dst)
BooleanNdArray
set(NdArray<Boolean> src, long... coordinates)
BooleanNdArray
setObject(Boolean value, long... coords)
BooleanNdArray
slice(long position, DimensionalSpace sliceDimensions)
BooleanNdArray
slice(Index... indices)
BooleanNdArray
write(DataBuffer<Boolean> src)
org.tensorflow.ndarray.impl.AbstractNdArray
DimensionalSpace
boolean
equals(Object obj)
int
NdArraySequence<BooleanNdArray>
scalars()
Returns a sequence of all scalars in this array.
Shape
shape()
abstract BooleanNdArray
slice(long position, DimensionalSpace dimensions)
boolean
equals(Object arg0)
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()
org.tensorflow.ndarray.NdArray
abstract NdArray<Boolean>
copyTo(NdArray<Boolean> dst)
Copy the content of this array to the destination array.
abstract NdArraySequence<? extends NdArray<T>>
elements(int dimensionIdx)
Returns a sequence of all elements at a given dimension.
abstract boolean
equals(Object obj)
Checks equality between n-dimensional arrays.
abstract NdArray<Boolean>
get(long... coordinates)
Returns the N-dimensional element of this array at the given coordinates.
abstract Boolean
getObject(long... coordinates)
Returns the value of the scalar found at the given coordinates.
abstract NdArray<Boolean>
read(DataBuffer<Boolean> dst)
Read the content of this N-dimensional array into the destination buffer.
abstract NdArraySequence<? extends NdArray<T>>
scalars()
Returns a sequence of all scalars in this array.
abstract NdArray<Boolean>
set(NdArray<Boolean> src, long... coordinates)
Assigns the value of the N-dimensional element found at the given coordinates.
abstract NdArray<Boolean>
setObject(Boolean value, long... coordinates)
Assigns the value of the scalar found at the given coordinates.
abstract NdArray<Boolean>
slice(Index... indices)
Creates a multi-dimensional view (or slice) of this array by mapping one or more dimensions to the given index selectors.
abstract NdArray<Boolean>
write(DataBuffer<Boolean> src)
Write the content of this N-dimensional array from the source buffer.
org.tensorflow.ndarray.BooleanNdArray
abstract BooleanNdArray
copyTo(NdArray<Boolean> dst)
abstract NdArraySequence<BooleanNdArray>
elements(int dimensionIdx)
Returns a sequence of all elements at a given dimension.
abstract BooleanNdArray
get(long... coordinates)
Returns the N-dimensional element of this array at the given coordinates.
abstract boolean
getBoolean(long... coordinates)
Returns the boolean value of the scalar found at the given coordinates.
abstract Boolean
getObject(long... coordinates)
Returns the value of the scalar found at the given coordinates.
abstract BooleanNdArray
read(DataBuffer<Boolean> dst)
abstract BooleanNdArray
abstract NdArraySequence<BooleanNdArray>
scalars()
Returns a sequence of all scalars in this array.
abstract BooleanNdArray
set(NdArray<Boolean> src, long... coordinates)
abstract BooleanNdArray
setBoolean(boolean value, long... coordinates)
Assigns the boolean value of the scalar found at the given coordinates.
abstract BooleanNdArray
setObject(Boolean value, long... coordinates)
abstract BooleanNdArray
slice(Index... indices)
Creates a multi-dimensional view (or slice) of this array by mapping one or more dimensions to the given index selectors.
abstract BooleanNdArray
write(DataBuffer<Boolean> src)
abstract BooleanNdArray
org.tensorflow.ndarray.Shaped
abstract int
rank()
abstract Shape
shape()
abstract long
size()
Computes and returns the total size of this container, in number of values.
org.tensorflow.ndarray.NdArray
abstract NdArray<Boolean>
copyTo(NdArray<Boolean> dst)
Copy the content of this array to the destination array.
abstract NdArraySequence<? extends NdArray<T>>
elements(int dimensionIdx)
Returns a sequence of all elements at a given dimension.
abstract boolean
equals(Object obj)
Checks equality between n-dimensional arrays.
abstract NdArray<Boolean>
get(long... coordinates)
Returns the N-dimensional element of this array at the given coordinates.
abstract Boolean
getObject(long... coordinates)
Returns the value of the scalar found at the given coordinates.
abstract NdArray<Boolean>
read(DataBuffer<Boolean> dst)
Read the content of this N-dimensional array into the destination buffer.
abstract NdArraySequence<? extends NdArray<T>>
scalars()
Returns a sequence of all scalars in this array.
abstract NdArray<Boolean>
set(NdArray<Boolean> src, long... coordinates)
Assigns the value of the N-dimensional element found at the given coordinates.
abstract NdArray<Boolean>
setObject(Boolean value, long... coordinates)
Assigns the value of the scalar found at the given coordinates.
abstract NdArray<Boolean>
slice(Index... indices)
Creates a multi-dimensional view (or slice) of this array by mapping one or more dimensions to the given index selectors.
abstract NdArray<Boolean>
write(DataBuffer<Boolean> src)
Write the content of this N-dimensional array from the source buffer.

Public Methods

public BooleanNdArray copyTo (NdArray<Boolean> dst)

public static BooleanNdArray create (BooleanDataBuffer buffer, Shape shape)

public boolean getBoolean (long... indices)

Returns the boolean value of the scalar found at the given coordinates.

To access the scalar element, the number of coordinates provided must be equal to the number of dimensions of this array (i.e. its rank). For example:

BooleanNdArray matrix = NdArrays.ofBooleans(shape(2, 2));  // matrix rank = 2
  matrix.getBoolean(0, 1);  // succeeds, returns false
  matrix.getBoolean(0);  // throws IllegalRankException

  BooleanNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
  scalar.getBoolean();  // succeeds, returns false
 

Parameters
indices coordinates of the scalar to resolve
Returns
  • value of that scalar

public BooleanNdArray read (BooleanDataBuffer dst)

public BooleanNdArray setBoolean (boolean value, long... indices)

Assigns the boolean value of the scalar found at the given coordinates.

To access the scalar element, the number of coordinates provided must be equal to the number of dimensions of this array (i.e. its rank). For example:

BooleanNdArray matrix = NdArrays.ofBooleans(shape(2, 2));  // matrix rank = 2
  matrix.setBoolean(true, 0, 1);  // succeeds
  matrix.setBoolean(true, 0);  // throws IllegalRankException

  BooleanNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
  scalar.setBoolean(true);  // succeeds
 

Parameters
value the value to assign
indices coordinates of the scalar to assign
Returns
  • this array

public BooleanNdArray write (BooleanDataBuffer src)