public abstract class BaseNDArray extends BaseShapedArray implements IStridedArray
| Modifier and Type | Field and Description |
|---|---|
protected double[] |
data |
protected int |
dimensions |
protected int |
offset |
protected int[] |
stride |
shape| Modifier | Constructor and Description |
|---|---|
protected |
BaseNDArray(double[] data,
int dimensions,
int offset,
int[] shape,
int[] stride) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkDimension(int dimension)
Checks if an array has the specified dimension.
|
int |
dimensionality()
Returns the dimensionality of the array (i.e.
|
long |
elementCount()
Returns the total number of elements in this array.
|
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
|
int |
getArrayOffset()
Gets the data array offset for the first element of this strided array
|
int |
getIndex(int... indexes) |
long[] |
getLongShape()
Returns the shape of the array as an array of longs.
|
int |
getShape(int dim)
Returns the dimension size for a specific dimension in the array's shape
|
int |
getStride(int dim)
Gets the stide for a specific dimension in this strided array.
|
int[] |
getStrides()
Gets the strides for each dimension of this strided array.
|
boolean |
isPackedArray()
Checks if this array is fully packed in row major order.
|
getShape, getShapeClone, isZero, reduce, reduce, sliceCountabs, absCopy, add, add, add, addAt, addCopy, addCopy, addInnerProduct, addInnerProduct, addInnerProduct, addMultiple, addOuterProduct, addPower, addPower, addToArray, applyOp, applyOp, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, asVector, broadcast, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, broadcastLike, checkMutable, clamp, clone, componentCount, copy, dense, denseClone, density, divide, divide, divideCopy, elementAbsPowSum, elementIterator, elementMax, elementMin, elementPowSum, elementProduct, elementsEqual, elementSquaredSum, elementSum, ensureMutable, epsilonEquals, epsilonEquals, equals, equals, equals, equalsArray, equalsArray, exp, fill, get, get, get, get, get, getComponent, getComponents, getElements, getElements, getElements, getElements, getSlices, getSlices, getSliceViews, getTranspose, getTransposeCopy, getTransposeView, hashCode, hasUncountable, immutable, innerProduct, innerProduct, innerProduct, innerProduct, isBoolean, isDense, isElementConstrained, isFullyMutable, isMutable, isSameShape, isSparse, iterator, join, join, log, multiply, multiply, multiplyCopy, multiplyCopy, mutable, negate, negateCopy, nonZeroCount, outerProduct, pow, reciprocal, reciprocalCopy, reduceSlices, reduceSlices, reorder, reorder, reshape, rotateView, scale, scaleAdd, scaleAdd, scaleCopy, set, 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, toDoubleArray, toDoubleBuffer, toSliceArray, toString, toStringFull, toVector, validate, withComponentsfinalize, getClass, notify, notifyAll, wait, wait, waitgetArrayabs, absCopy, add, add, addAt, addCopy, addCopy, addInnerProduct, addMultiple, addOuterProduct, addPower, addPower, addToArray, applyOp, applyOp, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, asVector, broadcast, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, broadcastLike, checkMutable, clamp, clone, componentCount, copy, dense, denseClone, divide, divide, divideCopy, elementAbsPowSum, elementIterator, elementMax, elementMin, elementPowSum, elementProduct, elementsEqual, elementSquaredSum, elementSum, ensureMutable, epsilonEquals, epsilonEquals, equals, equalsArray, equalsArray, exactClone, exp, fill, get, get, get, get, get, getComponent, getComponents, getElements, getElements, getElements, getElements, getShape, getShapeClone, getSlices, getSlices, getSliceViews, getTranspose, getTransposeCopy, getTransposeView, hasUncountable, immutable, innerProduct, innerProduct, innerProduct, innerProduct, isBoolean, isDense, isElementConstrained, isFullyMutable, isMutable, isSameShape, isSparse, isView, isZero, join, join, log, multiply, multiply, multiplyCopy, multiplyCopy, mutable, negate, negateCopy, nonZeroCount, outerProduct, pow, reciprocal, reciprocalCopy, reduce, reduce, reduceSlices, reduceSlices, reorder, reorder, reshape, rotateView, scale, scaleAdd, scaleAdd, scaleCopy, set, set, set, set, set, set, set, setElements, setElements, setElements, setInnerProduct, setMultiple, setMultiple, signum, signumCopy, slice, slice, sliceCount, sliceValue, sparse, sparseClone, sqrt, square, squareCopy, sub, sub, subArray, subCopy, toArray, toDoubleArray, toDoubleBuffer, toSliceArray, toVector, validate, withComponentsforEach, spliteratorprotected final int dimensions
protected int offset
protected final double[] data
protected final int[] stride
protected BaseNDArray(double[] data,
int dimensions,
int offset,
int[] shape,
int[] stride)
public int dimensionality()
INDArraydimensionality in interface INDArraydimensionality in class BaseShapedArraypublic final int getStride(int dim)
IStridedArraygetStride in interface IStridedArraypublic final int getShape(int dim)
INDArraygetShape in interface INDArraygetShape in class BaseShapedArraypublic long[] getLongShape()
INDArraygetLongShape in interface INDArraygetLongShape in class AbstractArray<INDArray>public int getIndex(int... indexes)
public double get(int... indexes)
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 boolean isPackedArray()
IStridedArrayisPackedArray in interface IStridedArraypublic long elementCount()
INDArrayelementCount in interface INDArrayelementCount in class BaseShapedArraypublic int getArrayOffset()
IStridedArraygetArrayOffset in interface IStridedArraypublic int[] getStrides()
IStridedArraygetStrides in interface IStridedArrayprotected final void checkDimension(int dimension)
AbstractArraycheckDimension in class AbstractArray<INDArray>Copyright © 2016. All rights reserved.