| Constructor and Description |
|---|
NDArray(double[] data,
int offset,
int[] shape,
int[] stride) |
NDArray(double[] data,
int dimensions,
int offset,
int[] shape,
int[] stride) |
NDArray(int... shape) |
| Modifier and Type | Method and Description |
|---|---|
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) |
NDArray |
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.
|
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.
|
boolean |
equals(INDArray a)
Returns true if the two arrays are exactly equal in value and shape
|
boolean |
equals(NDArray a) |
NDArray |
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
|
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<INDArray> |
getSlices()
Returns a list of all major slices of this array.
|
int |
getStride(int dim) |
INDArray |
innerProduct(INDArray a) |
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
|
static NDArray |
newArray(int... shape) |
INDArray |
outerProduct(INDArray a) |
INDArray |
reshape(int... dimensions) |
void |
set(double value) |
void |
set(int[] indexes,
double value) |
void |
set(int x,
double value) |
void |
set(int x,
int y,
double value) |
void |
setElements(double[] values,
int offset,
int length)
Sets all elements in an array using the given double values
|
INDArray |
slice(int majorSlice) |
int |
sliceCount() |
void |
sub(INDArray a) |
void |
validate()
Validates the internal data structure of the INDArray.
|
copyTo, equals, getElements, hashCode, iterator, nonZeroCount, scale, set, set, setElements, square, toStringpublic NDArray(int... shape)
public NDArray(double[] data,
int offset,
int[] shape,
int[] stride)
public NDArray(double[] data,
int dimensions,
int offset,
int[] shape,
int[] stride)
public static NDArray newArray(int... shape)
public int dimensionality()
INDArraypublic int[] getShape()
INDArraypublic int getStride(int dim)
public int getShape(int dim)
INDArraygetShape in interface INDArraygetShape in class AbstractArray<INDArray>public long[] getLongShape()
INDArraypublic double get()
INDArrayget in interface INDArrayget in class AbstractArray<INDArray>public double get(int x)
INDArrayget in interface INDArrayget in class AbstractArray<INDArray>public double get(int x,
int y)
INDArrayget in interface INDArrayget in class AbstractArray<INDArray>public double get(int... indexes)
INDArraypublic void set(double value)
set in interface INDArrayset in class AbstractArray<INDArray>public void set(int x,
double value)
set in interface INDArrayset in class AbstractArray<INDArray>public void set(int x,
int y,
double value)
set in interface INDArrayset in class AbstractArray<INDArray>public void set(int[] indexes,
double value)
public void add(INDArray a)
add in interface INDArrayadd in class AbstractArray<INDArray>public void sub(INDArray a)
sub in interface INDArraysub in class AbstractArray<INDArray>public INDArray innerProduct(INDArray a)
innerProduct in interface INDArrayinnerProduct in class AbstractArray<INDArray>public INDArray outerProduct(INDArray a)
outerProduct in interface INDArrayouterProduct in class AbstractArray<INDArray>public AVector asVector()
INDArraypublic INDArray reshape(int... dimensions)
reshape in interface INDArrayreshape in class AbstractArray<INDArray>public INDArray broadcast(int... dimensions)
broadcast in interface INDArraybroadcast in class AbstractArray<INDArray>public INDArray slice(int majorSlice)
public int sliceCount()
public long elementCount()
INDArraypublic boolean isMutable()
INDArraypublic boolean isFullyMutable()
INDArraypublic boolean isElementConstrained()
INDArraypublic boolean isView()
INDArraypublic void applyOp(Op op)
INDArraypublic void applyOp(IOp op)
INDArraypublic boolean equals(NDArray a)
public boolean equals(INDArray a)
INDArraypublic NDArray exactClone()
INDArraypublic NDArray clone()
INDArrayclone in interface INDArrayclone in class AbstractArray<INDArray>public void multiply(double d)
INDArraypublic void setElements(double[] values,
int offset,
int length)
INDArraypublic List<INDArray> getSlices()
INDArraygetSlices in interface INDArraygetSlices in class AbstractArray<INDArray>public void validate()
INDArrayvalidate in interface INDArrayvalidate in class AbstractArray<INDArray>Copyright © 2013. All Rights Reserved.