FloatDenseNdArray

public class FloatDenseNdArray

Public Methods

FloatDataBuffer
FloatNdArray
copyTo ( NdArray <Float> dst)
static FloatNdArray
float
getFloat (long... indices)
Returns the float value of the scalar found at the given coordinates.
FloatNdArray
FloatNdArray
setFloat (float value, long... indices)
Assigns the float value of the scalar found at the given coordinates.
FloatNdArray

Inherited Methods

Public Methods

public FloatDataBuffer buffer ()

public FloatNdArray copyTo ( NdArray <Float> dst)

public static FloatNdArray create ( FloatDataBuffer buffer, Shape shape)

public float getFloat (long... indices)

Returns the float 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:

FloatNdArray matrix = NdArrays.ofFloats(shape(2, 2));  // matrix rank = 2
  matrix.getFloat(0, 1);  // succeeds, returns 0.0f
  matrix.getFloat(0);  // throws IllegalRankException

  FloatNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
  scalar.getFloat();  // succeeds, returns 0.0f
 

Parameters
indices coordinates of the scalar to resolve
Returns