public interface INDArray extends Cloneable
| Modifier and Type | Method and Description |
|---|---|
void |
add(double a) |
void |
add(INDArray a) |
void |
applyOp(IOp op)
Applies a unary operator to all elements of the array (in-place)
|
void |
applyOp(Op op)
Applies a unary operator to all elements of the array (in-place)
|
AVector |
asVector()
Creates a view of the array as a single vector in row-major order.
|
INDArray |
broadcast(int... dimensions) |
INDArray |
clone()
Returns a clone of the array, as a new array which will be fully mutable
and may be of a different class to the original.
|
void |
copyTo(double[] arr)
Copies all the elements of this INDArray to the specified double array
|
int |
dimensionality()
Returns the dimensionality of the array (number of dimensions in the array shape)
e.g.
|
long |
elementCount()
Returns the total number of elements in this array.
|
double |
elementSquaredSum()
Returns the total sum of elements in this array.
|
double |
elementSum()
Returns the total sum of elements in this array.
|
boolean |
equals(INDArray a)
Returns true if the two arrays are exactly equal in value and shape
|
INDArray |
exactClone()
Returns an exact deep clone of an array (i.e.
|
double |
get()
Returns the double value of a scalar array
|
double |
get(int... indexes)
Returns the double value at the specified index position in an array
|
double |
get(int x)
Returns the double value at the specified position in a 1D vector
|
double |
get(int x,
int y)
Returns the double value at the specified position in a 2D matrix
|
void |
getElements(double[] dest,
int offset)
Gets all elements of the array, copying them into a double array
|
long[] |
getLongShape()
Returns the shape of the array as an array of longs.
|
int[] |
getShape()
Returns the shape of the array as an array of ints.
|
int |
getShape(int dim)
Returns the dimension size for a specific dimension in the array's shape
|
List<?> |
getSlices()
Returns a list of all major slices of this array.
|
List<INDArray> |
getSliceViews()
Returns a list of slices as mutable INDArray views.
|
INDArray |
innerProduct(INDArray a)
Calculates the inner product of this array with another array.
|
boolean |
isElementConstrained()
Returns true if the IND has additional constraints on element values
|
boolean |
isFullyMutable()
Returns true if the INDArray is fully mutable in all positions
i.e.
|
boolean |
isMutable()
Returns true if the INDArray is mutable (at least partially)
|
boolean |
isView()
Return true if this is a view
|
void |
multiply(double d)
Multiplies all elements of the array by a given double value
|
void |
multiply(INDArray a)
Multiplies all elements by the equivalent elements in a second array
|
void |
negate() |
long |
nonZeroCount()
Returns the number of non-zero elements in the array.
|
INDArray |
outerProduct(INDArray a)
Calculates the outer product of this array with another array.
|
INDArray |
reshape(int... dimensions) |
void |
scale(double d)
Scales all elements of the array by a given double value
|
void |
scaleAdd(double factor,
double constant)
Scales all elements of the array by a given double value and adds a constant vale
|
void |
set(double value)
Sets all elements of an array to a specific double value
|
void |
set(INDArray a) |
void |
set(int[] indexes,
double value) |
void |
set(int i,
double value) |
void |
set(int i,
int j,
double value) |
void |
set(Object o) |
void |
setElements(double[] values)
Sets all elements in an array using the given double values
|
void |
setElements(double[] values,
int offset,
int length)
Sets all elements in an array using the given double values
|
INDArray |
slice(int majorSlice) |
INDArray |
slice(int dimension,
int index) |
int |
sliceCount() |
void |
sub(double a) |
void |
sub(INDArray a) |
void |
toDoubleBuffer(DoubleBuffer dest)
Copies the elements of this INDArray to the specified double buffer
|
AVector |
toVector()
Converts the array into a flattened vector
|
void |
validate()
Validates the internal data structure of the INDArray.
|
int dimensionality()
int[] getShape()
int getShape(int dim)
dim - long[] getLongShape()
double get()
double get(int x)
double get(int x,
int y)
double get(int... indexes)
void set(double value)
value - void set(int i,
double value)
void set(int i,
int j,
double value)
void set(int[] indexes,
double value)
void set(INDArray a)
void set(Object o)
void add(double a)
void sub(double a)
void add(INDArray a)
void sub(INDArray a)
void negate()
INDArray innerProduct(INDArray a)
a - INDArray outerProduct(INDArray a)
a - AVector asVector()
INDArray reshape(int... dimensions)
INDArray broadcast(int... dimensions)
INDArray slice(int majorSlice)
INDArray slice(int dimension, int index)
int sliceCount()
long elementCount()
double elementSum()
double elementSquaredSum()
void multiply(INDArray a)
long nonZeroCount()
boolean isMutable()
boolean isFullyMutable()
boolean isElementConstrained()
boolean isView()
INDArray clone()
void applyOp(Op op)
op - void applyOp(IOp op)
op - boolean equals(INDArray a)
a - INDArray exactClone()
void setElements(double[] values)
void setElements(double[] values,
int offset,
int length)
void getElements(double[] dest,
int offset)
d - void scale(double d)
d - void scaleAdd(double factor,
double constant)
d - void multiply(double d)
d - List<?> getSlices()
void validate()
void copyTo(double[] arr)
arr - void toDoubleBuffer(DoubleBuffer dest)
arr - List<INDArray> getSliceViews()
AVector toVector()
Copyright © 2013. All Rights Reserved.