public interface INDArray extends Cloneable
| Modifier and Type | Method and Description |
|---|---|
void |
abs()
Replaces all elements of this array with their absolute values, according to Math.abs(double)
|
void |
add(double a)
Adds a double value to all elements in this array
|
void |
add(INDArray a)
Adds all the elements of another array to this array, in an elementwise order.
|
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)
|
List<Double> |
asElementList()
Returns a list containing all elements of this array
|
AVector |
asVector()
Creates a view of the array as a single vector in row-major order.
|
INDArray |
broadcast(int... shape)
Returns a view of this array broadcasted up to a larger shape
|
void |
clamp(double min,
double max)
Clamps all the elments of this array within the specified [min,max] range
|
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.
|
Iterator<Double> |
elementIterator()
Returns an iterator over all 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.
|
INDArray |
ensureMutable()
Ensures the array is a fully mutable, efficient representation that is not
a view.
|
boolean |
epsilonEquals(INDArray a)
Tests is this array is approximately equal to another array.
|
boolean |
epsilonEquals(INDArray a,
double epsilon)
Tests is this array is approximately equal to another array, up to a given tolerance (epsilon)
The arrays must have the same shape
|
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.
|
void |
exp()
Computes the function e^x (in-place) for all array elements
|
void |
fill(double value)
Fills the array with asingle double value
|
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 |
getTranspose()
Returns the transpose of this array.
|
INDArray |
getTransposeView()
Returns a transposed view of the array.
|
INDArray |
innerProduct(INDArray a)
Calculates the inner product of this array with another array.
|
boolean |
isBoolean()
Returns true if the array is boolean (contains only 0.0 or 1.0 value
|
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 |
log()
Computes the natural logarithm (in-place) for all array elements
|
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()
Negates all elements in the array
|
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.
|
void |
pow(double exponent)
Raises all elements of the array to a specified power
|
void |
reciprocal()
Replaces all elements in the array with their reciprocal
|
INDArray |
reshape(int... shape)
Returns a new array by rearranging the elements of this array into the desired shape
Truncates or zero-pads the elements as required to fill the new shape
|
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)
Sets this array to the element values contained in another array
|
void |
set(int[] indexes,
double value) |
void |
set(int i,
double value) |
void |
set(int i,
int j,
double value) |
void |
set(Object o)
Sets this array to the element values contained in the given object.
|
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
|
void |
signum()
Calculates the signum of all elements of the array
|
INDArray |
slice(int majorSlice)
Returns the specified major slice of this array (slice along dimension 0)
|
INDArray |
slice(int dimension,
int index)
Returns a slice of this array along the specified dimension
|
int |
sliceCount()
returns the number of major slices in this array.
|
void |
sqrt()
Computes the square root of all elements in the array
|
void |
square()
Squares all elements of the array
|
void |
sub(double a)
Subtracts a double value from all elements in this array
|
void |
sub(INDArray a)
Subtracts all the elements of another array from this array, in an elementwise order.
|
Array |
toArray()
Converts the array into a packed mutable Array instance
|
double[] |
toDoubleArray()
Copies the elements of this INDArray to a new double array
|
void |
toDoubleBuffer(DoubleBuffer dest)
Copies the elements of this INDArray to the specified double buffer
|
Vector |
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)
a - void set(Object o)
a - void add(double a)
void sub(double a)
void add(INDArray a)
a - void sub(INDArray a)
a - void fill(double value)
value - void negate()
void reciprocal()
void clamp(double min,
double max)
min - max - INDArray innerProduct(INDArray a)
a - INDArray outerProduct(INDArray a)
a - AVector asVector()
List<Double> asElementList()
INDArray reshape(int... shape)
shape - INDArray broadcast(int... shape)
shape - INDArray slice(int majorSlice)
majorSlice - INDArray slice(int dimension, int index)
majorSlice - INDArray getTranspose()
INDArray getTransposeView()
int sliceCount()
long elementCount()
double elementSum()
double elementSquaredSum()
Iterator<Double> elementIterator()
void multiply(INDArray a)
long nonZeroCount()
boolean isMutable()
boolean isBoolean()
boolean isFullyMutable()
boolean isElementConstrained()
boolean isView()
INDArray clone()
INDArray ensureMutable()
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 - void pow(double exponent)
exponent - void square()
void sqrt()
void signum()
List<?> getSlices()
void validate()
void copyTo(double[] arr)
arr - void toDoubleBuffer(DoubleBuffer dest)
arr - double[] toDoubleArray()
arr - List<INDArray> getSliceViews()
Vector toVector()
Array toArray()
boolean epsilonEquals(INDArray a)
a - boolean epsilonEquals(INDArray a, double epsilon)
a - void abs()
void log()
void exp()
Copyright © 2013. All Rights Reserved.