public final class NDArray extends BaseNDArray
data, dimensions, offset, shape, stride| Modifier and Type | Method and Description |
|---|---|
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)
|
double[] |
asDoubleArray()
Returns the underlying double array representing the packed elements of this array
Returns nil if there is no such underlying array
|
AVector |
asVector()
Constructs a view of the array as a single vector in row-major order.
|
INDArray |
broadcast(int... dimensions)
Returns a view of this array broadcasted up to a larger shape
|
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.
|
Iterator<Double> |
elementIterator()
Returns an iterator over all 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[] |
getArray() |
List<INDArray> |
getSlices()
Returns a list of all major slices of this array.
|
INDArray |
getTranspose()
Returns the transpose of this array.
|
INDArray |
getTransposeView()
Returns a transposed view of the array.
|
INDArray |
immutable()
Returns an immutable version of this INDArray's data
|
INDArray |
innerProduct(INDArray a)
Calculates the inner product of this array with another array.
|
boolean |
isElementConstrained()
Returns true if this array has some constraints on element values
|
boolean |
isFullyMutable()
If this method returns true, the INDArray is guaranteed to be 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 array is a view type
|
void |
multiply(double d)
Multiplies all elements of the array by a given double value
|
static NDArray |
newArray(int... shape) |
INDArray |
outerProduct(INDArray a)
Calculates the outer product of this array with another array.
|
INDArray |
reshape(int... dimensions)
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 |
set(double value)
Sets all elements of an array to a specific 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)
Returns the specified major slice of this array as a view (slice along dimension 0)
|
INDArray |
slice(int dimension,
int index)
Returns a slice view of this array along the specified dimension
|
void |
sub(INDArray a)
Subtracts all the elements of another array from this array, in an elementwise order.
|
NDArray |
subArray(int[] offsets,
int[] shape)
Returns a subarray view of a larger array
|
void |
toDoubleBuffer(DoubleBuffer dest)
Copies the elements of this INDArray to the specified double buffer
|
void |
validate()
Validates the internal data structure of the INDArray.
|
static NDArray |
wrap(double[] data,
int[] shape) |
static NDArray |
wrap(INDArray a) |
static NDArray |
wrap(IStridedArray a) |
static NDArray |
wrap(Matrix m) |
static NDArray |
wrap(Vector v) |
static INDArray |
wrapStrided(double[] data,
int offset,
int[] shape,
int[] strides) |
dimensionality, elementCount, get, get, get, get, getArrayOffset, getIndex, getLongShape, getShape, getShape, getShapeClone, getStride, getStrides, isPackedArray, sliceCountabs, asElementList, broadcastCloneLike, broadcastLike, clamp, copyTo, divide, divide, elementSquaredSum, elementSum, ensureMutable, epsilonEquals, epsilonEquals, equals, exp, fill, getElements, getSlices, getSliceViews, getTransposeCopy, hashCode, isBoolean, isSameShape, isZero, iterator, join, log, multiply, mutable, negate, nonZeroCount, pow, reciprocal, rotateView, scale, scaleAdd, set, set, setElements, signum, sqrt, square, sub, toArray, toDoubleArray, toString, toVectorfinalize, getClass, notify, notifyAll, wait, wait, waitabs, asElementList, broadcastCloneLike, broadcastLike, clamp, copyTo, divide, divide, elementSquaredSum, elementSum, ensureMutable, epsilonEquals, epsilonEquals, exp, fill, getElements, getSlices, getSliceViews, getTransposeCopy, isBoolean, isSameShape, isZero, join, log, multiply, mutable, negate, nonZeroCount, pow, reciprocal, rotateView, scale, scaleAdd, set, set, setElements, signum, sqrt, square, sub, toArray, toDoubleArray, toVectorpublic static NDArray wrap(double[] data, int[] shape)
public static NDArray wrap(IStridedArray a)
public static NDArray newArray(int... shape)
public void set(double value)
INDArrayset 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(double a)
INDArrayadd in interface INDArrayadd in class AbstractArray<INDArray>public void add(INDArray a)
INDArrayadd in interface INDArrayadd in class AbstractArray<INDArray>public void sub(INDArray a)
INDArraysub in interface INDArraysub in class AbstractArray<INDArray>public INDArray innerProduct(INDArray a)
INDArrayinnerProduct in interface INDArrayinnerProduct in class AbstractArray<INDArray>public INDArray outerProduct(INDArray a)
INDArrayouterProduct in interface INDArrayouterProduct in class AbstractArray<INDArray>public INDArray getTranspose()
INDArraygetTranspose in interface INDArraygetTranspose in class AbstractArray<INDArray>public INDArray getTransposeView()
INDArraygetTransposeView in interface INDArraygetTransposeView in class AbstractArray<INDArray>public AVector asVector()
INDArrayasVector in interface INDArrayasVector in class AbstractArray<INDArray>public INDArray reshape(int... dimensions)
INDArrayreshape in interface INDArrayreshape in class AbstractArray<INDArray>public INDArray broadcast(int... dimensions)
INDArraybroadcast in interface INDArraybroadcast in class AbstractArray<INDArray>public INDArray slice(int majorSlice)
INDArraypublic INDArray slice(int dimension, int index)
INDArraypublic NDArray subArray(int[] offsets, int[] shape)
INDArraysubArray in interface INDArraysubArray in class AbstractArray<INDArray>public boolean isMutable()
INDArrayisMutable in interface INDArrayisMutable in class AbstractArray<INDArray>public boolean isFullyMutable()
INDArrayisFullyMutable in interface INDArrayisFullyMutable in class AbstractArray<INDArray>public boolean isElementConstrained()
INDArrayisElementConstrained in interface INDArrayisElementConstrained in class AbstractArray<INDArray>public boolean isView()
INDArraypublic void applyOp(Op op)
INDArrayapplyOp in interface INDArrayapplyOp in class AbstractArray<INDArray>public void applyOp(IOp op)
INDArrayapplyOp in interface INDArrayapplyOp in class AbstractArray<INDArray>public boolean equals(NDArray a)
public boolean equals(INDArray a)
INDArrayequals in interface INDArrayequals in class AbstractArray<INDArray>public NDArray exactClone()
INDArraypublic INDArray clone()
INDArrayclone in interface INDArrayclone in class AbstractArray<INDArray>public void multiply(double d)
INDArraymultiply in interface INDArraymultiply in class AbstractArray<INDArray>public void setElements(double[] values,
int offset,
int length)
INDArraysetElements in interface INDArraysetElements in class AbstractArray<INDArray>public void toDoubleBuffer(DoubleBuffer dest)
INDArraytoDoubleBuffer in interface INDArraytoDoubleBuffer in class AbstractArray<INDArray>public double[] asDoubleArray()
INDArrayasDoubleArray in interface INDArrayasDoubleArray in class AbstractArray<INDArray>public List<INDArray> getSlices()
INDArraygetSlices in interface INDArraygetSlices in class AbstractArray<INDArray>public Iterator<Double> elementIterator()
INDArrayelementIterator in interface INDArrayelementIterator in class AbstractArray<INDArray>public void validate()
INDArrayvalidate in interface INDArrayvalidate in class AbstractArray<INDArray>public INDArray immutable()
INDArrayimmutable in interface INDArrayimmutable in class AbstractArray<INDArray>public double[] getArray()
public static INDArray wrapStrided(double[] data, int offset, int[] shape, int[] strides)
Copyright © 2013. All Rights Reserved.