DoubleDenseNdArray

public class DoubleDenseNdArray

Public Methods

DoubleNdArray
copyTo(NdArray<Double> dst)
static DoubleNdArray
create(DoubleDataBuffer buffer, Shape shape)
double
getDouble(long... indices)
Returns the double value of the scalar found at the given coordinates.
DoubleNdArray
DoubleNdArray
setDouble(double value, long... indices)
Assigns the double value of the scalar found at the given coordinates.
DoubleNdArray

Inherited Methods

org.tensorflow.ndarray.impl.dense.AbstractDenseNdArray
NdArraySequence<DoubleNdArray>
elements(int dimensionIdx)
boolean
equals(Object obj)
DoubleNdArray
get(long... coords)
Double
getObject(long... coords)
int
DoubleNdArray
read(DataBuffer<Double> dst)
DoubleNdArray
set(NdArray<Double> src, long... coordinates)
DoubleNdArray
setObject(Double value, long... coords)
DoubleNdArray
slice(long position, DimensionalSpace sliceDimensions)
DoubleNdArray
slice(Index... indices)
DoubleNdArray
write(DataBuffer<Double> src)
org.tensorflow.ndarray.impl.AbstractNdArray
DimensionalSpace
boolean
equals(Object obj)
int
NdArraySequence<DoubleNdArray>
scalars()
Returns a sequence of all scalars in this array.
Shape
shape()
abstract DoubleNdArray
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<Double>
copyTo(NdArray<Double> 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<Double>
get(long... coordinates)
Returns the N-dimensional element of this array at the given coordinates.
abstract Double
getObject(long... coordinates)
Returns the value of the scalar found at the given coordinates.
abstract NdArray<Double>
read(DataBuffer<Double> 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<Double>
set(NdArray<Double> src, long... coordinates)
Assigns the value of the N-dimensional element found at the given coordinates.
abstract NdArray<Double>
setObject(Double value, long... coordinates)
Assigns the value of the scalar found at the given coordinates.
abstract NdArray<Double>
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<Double>
write(DataBuffer<Double> src)
Write the content of this N-dimensional array from the source buffer.
org.tensorflow.ndarray.DoubleNdArray
abstract DoubleNdArray
copyTo(NdArray<Double> dst)
abstract NdArraySequence<DoubleNdArray>
elements(int dimensionIdx)
Returns a sequence of all elements at a given dimension.
abstract DoubleNdArray
get(long... coordinates)
Returns the N-dimensional element of this array at the given coordinates.
abstract double
getDouble(long... coordinates)
Returns the double value of the scalar found at the given coordinates.
abstract Double
getObject(long... coordinates)
Returns the value of the scalar found at the given coordinates.
abstract DoubleNdArray
read(DataBuffer<Double> dst)
abstract DoubleNdArray
abstract NdArraySequence<DoubleNdArray>
scalars()
Returns a sequence of all scalars in this array.
abstract DoubleNdArray
set(NdArray<Double> src, long... coordinates)
abstract DoubleNdArray
setDouble(double value, long... coordinates)
Assigns the double value of the scalar found at the given coordinates.
abstract DoubleNdArray
setObject(Double value, long... coordinates)
abstract DoubleNdArray
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 DoubleNdArray
write(DataBuffer<Double> src)
abstract DoubleNdArray
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<Double>
copyTo(NdArray<Double> 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<Double>
get(long... coordinates)
Returns the N-dimensional element of this array at the given coordinates.
abstract Double
getObject(long... coordinates)
Returns the value of the scalar found at the given coordinates.
abstract NdArray<Double>
read(DataBuffer<Double> 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<Double>
set(NdArray<Double> src, long... coordinates)
Assigns the value of the N-dimensional element found at the given coordinates.
abstract NdArray<Double>
setObject(Double value, long... coordinates)
Assigns the value of the scalar found at the given coordinates.
abstract NdArray<Double>
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<Double>
write(DataBuffer<Double> src)
Write the content of this N-dimensional array from the source buffer.

Public Methods

public DoubleNdArray copyTo (NdArray<Double> dst)

public static DoubleNdArray create (DoubleDataBuffer buffer, Shape shape)

public double getDouble (long... indices)

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

DoubleNdArray matrix = NdArrays.ofDoubles(shape(2, 2));  // matrix rank = 2
  matrix.getDouble(0, 1);  // succeeds, returns 0.0
  matrix.getDouble(0);  // throws IllegalRankException

  DoubleNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
  scalar.getDouble();  // succeeds, returns 0.0
 

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

public DoubleNdArray read (DoubleDataBuffer dst)

public DoubleNdArray setDouble (double value, long... indices)

Assigns the double 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:

DoubleNdArray matrix = NdArrays.ofDoubles(shape(2, 2));  // matrix rank = 2
  matrix.setDouble(10.0, 0, 1);  // succeeds
  matrix.setDouble(10.0, 0);  // throws IllegalRankException

  DoubleNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
  scalar.setDouble(10.0);  // succeeds
 

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

public DoubleNdArray write (DoubleDataBuffer src)