Public Methods
BooleanNdArray | |
static BooleanNdArray | |
boolean |
getBoolean(long... indices)
Returns the boolean value of the scalar found at the given coordinates.
|
BooleanNdArray |
read(BooleanDataBuffer dst)
|
BooleanNdArray |
setBoolean(boolean value, long... indices)
Assigns the boolean value of the scalar found at the given coordinates.
|
BooleanNdArray |
write(BooleanDataBuffer src)
|
Inherited Methods
Public Methods
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 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