Public Methods
DoubleNdArray | |
static DoubleNdArray | |
double |
getDouble(long... indices)
Returns the double value of the scalar found at the given coordinates.
|
DoubleNdArray |
read(DoubleDataBuffer dst)
|
DoubleNdArray |
setDouble(double value, long... indices)
Assigns the double value of the scalar found at the given coordinates.
|
DoubleNdArray |
write(DoubleDataBuffer src)
|
Inherited Methods
NdArraySequence<DoubleNdArray> |
elements(int dimensionIdx)
|
boolean |
equals(Object obj)
|
DoubleNdArray |
get(long... coords)
|
Double |
getObject(long... coords)
|
int |
hashCode()
|
DoubleNdArray |
read(DataBuffer<Double> dst)
|
DoubleNdArray | |
DoubleNdArray |
setObject(Double value, long... coords)
|
DoubleNdArray |
slice(long position, DimensionalSpace sliceDimensions)
|
DoubleNdArray | |
DoubleNdArray |
write(DataBuffer<Double> src)
|
DimensionalSpace | |
boolean |
equals(Object obj)
|
int |
hashCode()
|
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()
|
abstract NdArray<Double> | |
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> | |
abstract NdArray<Double> |
setObject(Double value, long... coordinates)
Assigns the value of the scalar found at the given coordinates.
|
abstract NdArray<Double> | |
abstract NdArray<Double> |
abstract DoubleNdArray | |
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 |
read(DoubleDataBuffer dst)
|
abstract NdArraySequence<DoubleNdArray> |
scalars()
Returns a sequence of all scalars in this array.
|
abstract DoubleNdArray | |
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 | |
abstract DoubleNdArray |
write(DataBuffer<Double> src)
|
abstract DoubleNdArray |
write(DoubleDataBuffer src)
|
abstract NdArray<Double> | |
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> | |
abstract NdArray<Double> |
setObject(Double value, long... coordinates)
Assigns the value of the scalar found at the given coordinates.
|
abstract NdArray<Double> | |
abstract NdArray<Double> |
Public Methods
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 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