public abstract class BaseNDArray extends AbstractArray<INDArray> implements IStridedArray
| Modifier and Type | Field and Description |
|---|---|
protected double[] |
data |
protected int |
dimensions |
protected int |
offset |
protected int[] |
shape |
protected int[] |
stride |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseNDArray(double[] data,
int dimensions,
int offset,
int[] shape,
int[] stride) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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() |
int |
getIndex(int... indexes) |
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
|
int[] |
getShapeClone()
Returns the shape of the array as an array of ints, guaranteed to be a new array
|
int |
getStride(int dim) |
int[] |
getStrides() |
boolean |
isPackedArray() |
int |
sliceCount()
returns the number of major slices in this array.
|
abs, add, add, applyOp, applyOp, asDoubleArray, asElementList, asVector, broadcast, broadcastCloneLike, broadcastLike, clamp, clone, copyTo, divide, divide, elementIterator, elementSquaredSum, elementSum, ensureMutable, epsilonEquals, epsilonEquals, equals, equals, exp, fill, getElements, getSlices, getSlices, getSliceViews, getTranspose, getTransposeCopy, getTransposeView, hashCode, immutable, innerProduct, isBoolean, isElementConstrained, isFullyMutable, isMutable, isSameShape, isZero, iterator, join, log, multiply, multiply, mutable, negate, nonZeroCount, outerProduct, pow, reciprocal, reshape, rotateView, scale, scaleAdd, set, set, set, set, set, setElements, setElements, signum, sqrt, square, sub, sub, subArray, toArray, toDoubleArray, toDoubleBuffer, toString, toVector, validatefinalize, getClass, notify, notifyAll, wait, wait, waitgetArrayabs, add, add, applyOp, applyOp, asDoubleArray, asElementList, asVector, broadcast, broadcastCloneLike, broadcastLike, clamp, clone, copyTo, divide, divide, elementIterator, elementSquaredSum, elementSum, ensureMutable, epsilonEquals, epsilonEquals, equals, exactClone, exp, fill, getElements, getSlices, getSlices, getSliceViews, getTranspose, getTransposeCopy, getTransposeView, immutable, innerProduct, isBoolean, isElementConstrained, isFullyMutable, isMutable, isSameShape, isView, isZero, join, log, multiply, multiply, mutable, negate, nonZeroCount, outerProduct, pow, reciprocal, reshape, rotateView, scale, scaleAdd, set, set, set, set, set, set, setElements, setElements, signum, slice, slice, sqrt, square, sub, sub, subArray, toArray, toDoubleArray, toDoubleBuffer, toVector, validateprotected final int dimensions
protected final int[] shape
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 INDArraypublic int[] getShape()
INDArraygetShape in interface IStridedArraygetShape in interface INDArraypublic int[] getShapeClone()
INDArraygetShapeClone in interface INDArraygetShapeClone in class AbstractArray<INDArray>public int getStride(int dim)
getStride in interface IStridedArraypublic int getShape(int dim)
INDArraygetShape in interface INDArraygetShape in class AbstractArray<INDArray>public 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()
isPackedArray in interface IStridedArraypublic int sliceCount()
INDArraysliceCount in interface INDArraypublic long elementCount()
INDArrayelementCount in interface INDArraypublic int getArrayOffset()
getArrayOffset in interface IStridedArraypublic int[] getStrides()
getStrides in interface IStridedArrayCopyright © 2013. All Rights Reserved.