T - public final class SliceArray<T extends INDArray> extends BaseShapedArray
shape| Modifier and Type | Method and Description |
|---|---|
void |
applyOp(IOperator 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()
Constructs a view of all elements in the array as a single vector in row-major order.
|
int |
componentCount()
Returns the number of components of this array.
|
static <T extends INDArray> |
create(INDArray a) |
static SliceArray<INDArray> |
create(List<INDArray> slices) |
static SliceArray<INDArray> |
create(List<INDArray> slices,
int[] shape) |
int |
dimensionality()
Returns the dimensionality of the array (i.e.
|
long |
elementCount()
Returns the total number of elements in this array.
|
boolean |
equals(INDArray a)
Checks if two arrays are equal exactly in terms of both value and shape
|
boolean |
equalsArray(double[] values,
int offset)
Returns true if the elements in this array exactly match the elements in the given array, in
row-major order
|
SliceArray<T> |
exactClone()
Creates a deep clone of an array, using the same class implementation as the original array
|
void |
fill(double value)
Fills this array with a single 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
|
T |
getComponent(int k)
Gets a component from the array at the specified index
Will throw an error if components are not supported, or if the component is out of bounds as defined by 0 <= k |
INDArray[] |
getComponents()
Gets all components in a new array, with length componentCount();
|
long[] |
getLongShape()
Returns the shape of the array as an array of longs.
|
List<?> |
getSlices()
Returns a list of all major slices of this 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 values)
|
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 considered as a view type.
|
boolean |
isZero()
Returns true if the array is zero (all elements equal to zero)
|
void |
multiply(double d)
Multiplies all elements of the array in place by a given double value
|
static <T extends INDArray> |
of(T... slices) |
INDArray |
outerProduct(INDArray a)
Calculates the outer product of this array with another array.
|
static SliceArray<INDArray> |
repeat(INDArray s,
int n) |
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)
Sets the element at the given indexed position in a mutable array
|
T |
slice(int majorSlice)
Returns the specified major slice of this array as a view (slice along dimension 0)
0 dimensional slice results are permitted, but attempting to slice a 0 dimensional array
will result in an error.
|
INDArray |
slice(int dimension,
int index)
Returns a slice view of this array along the specified dimension
|
double[] |
toDoubleArray()
Copies the elements of this array to a new double[] array.
|
INDArray[] |
toSliceArray()
Copies the slices of this array to a new INDArray[]
|
void |
validate()
Validates the internal data structure of the INDArray.
|
getShape, getShape, getShapeClone, reduce, reduce, sliceCountabs, absCopy, add, add, add, addAt, addCopy, addCopy, addInnerProduct, addInnerProduct, addInnerProduct, addMultiple, addOuterProduct, addPower, addPower, addToArray, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, broadcast, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, broadcastLike, checkDimension, checkMutable, clamp, clone, copy, dense, denseClone, density, divide, divide, divideCopy, elementAbsPowSum, elementIterator, elementMax, elementMin, elementPowSum, elementProduct, elementsEqual, elementSquaredSum, elementSum, ensureMutable, epsilonEquals, epsilonEquals, equals, equals, equalsArray, exp, get, get, get, get, get, getElements, getElements, getElements, getElements, getSlices, getSliceViews, getTranspose, getTransposeCopy, getTransposeView, hashCode, hasUncountable, immutable, innerProduct, innerProduct, innerProduct, isDense, isSameShape, isSparse, iterator, join, join, log, multiply, multiplyCopy, multiplyCopy, mutable, negate, negateCopy, nonZeroCount, pow, reciprocal, reciprocalCopy, reduceSlices, reduceSlices, reorder, reorder, rotateView, scale, scaleAdd, scaleAdd, scaleCopy, set, set, set, set, set, setElements, setElements, setElements, setInnerProduct, setMultiple, setMultiple, signum, signumCopy, sliceValue, sparse, sparseClone, sqrt, square, squareCopy, sub, sub, sub, subArray, subCopy, toArray, toDoubleBuffer, toString, toStringFull, toVector, withComponentsfinalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static <T extends INDArray> SliceArray<T> create(INDArray a)
@SafeVarargs public static <T extends INDArray> SliceArray<T> of(T... slices)
public static SliceArray<INDArray> repeat(INDArray s, int n)
public static SliceArray<INDArray> create(List<INDArray> slices)
public static SliceArray<INDArray> create(List<INDArray> slices, int[] shape)
public int dimensionality()
INDArraydimensionality in interface INDArraydimensionality in class BaseShapedArraypublic long[] getLongShape()
INDArraygetLongShape in interface INDArraygetLongShape in class AbstractArray<INDArray>public double get(int... indexes)
INDArraypublic void set(double value)
INDArrayset in interface INDArrayset in class AbstractArray<INDArray>public void fill(double value)
INDArrayfill in interface INDArrayfill in class AbstractArray<INDArray>public void set(int[] indexes,
double value)
INDArraypublic AVector asVector()
INDArrayasVector in interface INDArrayasVector in class AbstractArray<INDArray>public INDArray reshape(int... dimensions)
INDArrayreshape in interface INDArrayreshape in class AbstractArray<INDArray>public T slice(int majorSlice)
INDArraypublic int componentCount()
INDArraycomponentCount in interface INDArraycomponentCount in class AbstractArray<INDArray>public T getComponent(int k)
INDArraygetComponent in interface INDArraygetComponent in class AbstractArray<INDArray>public INDArray slice(int dimension, int index)
INDArraypublic long elementCount()
INDArrayelementCount in interface INDArrayelementCount in class BaseShapedArraypublic 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 boolean isMutable()
INDArrayisMutable in interface INDArrayisMutable in class AbstractArray<INDArray>public boolean isFullyMutable()
INDArrayisFullyMutable in interface INDArrayisFullyMutable in class AbstractArray<INDArray>public boolean isZero()
INDArrayisZero in interface INDArrayisZero in class BaseShapedArraypublic boolean isBoolean()
INDArrayisBoolean in interface INDArrayisBoolean 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(IOperator op)
INDArrayapplyOp in interface INDArrayapplyOp in class AbstractArray<INDArray>op - The operator to apply to the arraypublic void multiply(double d)
INDArraymultiply in interface INDArraymultiply in class AbstractArray<INDArray>public boolean equals(INDArray a)
INDArrayequals in interface INDArrayequals in class AbstractArray<INDArray>public SliceArray<T> exactClone()
INDArraypublic List<?> getSlices()
INDArraygetSlices in interface INDArraygetSlices in class AbstractArray<INDArray>public INDArray[] toSliceArray()
INDArraytoSliceArray in interface INDArraytoSliceArray in class AbstractArray<INDArray>public INDArray[] getComponents()
INDArraygetComponents in interface INDArraygetComponents in class AbstractArray<INDArray>public double[] toDoubleArray()
INDArraytoDoubleArray in interface INDArraytoDoubleArray in class AbstractArray<INDArray>public boolean equalsArray(double[] values,
int offset)
INDArrayequalsArray in interface INDArrayequalsArray in class AbstractArray<INDArray>values - Array of double element values to check for equalityoffset - Offset into the data arraypublic void validate()
INDArrayvalidate in interface INDArrayvalidate in class AbstractArray<INDArray>public double get()
INDArrayget in interface INDArrayget in class AbstractArray<INDArray>public double get(int x)
INDArrayget in interface INDArrayget in class AbstractArray<INDArray>Copyright © 2016. All rights reserved.