public final class StridedMatrix extends BaseStridedMatrix
colStride, offset, rowStridedatacols, rows| Modifier and Type | Method and Description |
|---|---|
void |
applyOp(Op op)
Applies a unary operator to all elements of the array (in-place)
|
AVector |
asVector()
Returns the matrix values as a single reference Vector in the form [row0
row1 row2....]
|
void |
copyColumnTo(int col,
double[] dest,
int destOffset)
Copies the elements in a selected row of this matrix to a double array
|
void |
copyRowTo(int row,
double[] dest,
int destOffset)
Copies the elements in a slected row of this matrix to a double array
|
static StridedMatrix |
create(AMatrix m) |
static StridedMatrix |
create(int rowCount,
int columnCount) |
boolean |
equals(AMatrix a)
Returns true if this matrix is exactly equal to another matrix
|
boolean |
equalsArray(double[] data,
int offset)
Returns true if the elements in this array exactly match the elements in the given array, in
row-major order
|
AMatrix |
exactClone()
Creates a deep clone of an array, using the same class implementation as the original array
|
AStridedVector |
getColumn(int i)
Returns a column of the matrix.
|
void |
getElements(double[] dest,
int destOffset)
Gets all elements of the array, copying them into a double array at the specified offset
|
AStridedVector |
getRow(int i)
Returns a row of the matrix.
|
AStridedMatrix |
getTranspose()
Returns the transpose of this array.
|
AStridedMatrix |
getTransposeView()
Returns a transposed view of the array.
|
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 |
isPackedArray()
Returns true if the data array is fully packed by this matrix in row-major order
|
void |
set(int i,
int j,
double value)
Sets a value at a given position in a mutable 2D array
|
AStridedMatrix |
subMatrix(int rowStart,
int rowCount,
int colStart,
int colCount)
Gets a rectangular submatrix view of part of a matrix
|
void |
unsafeSet(int i,
int j,
double value)
Sets an element value in the matrix in an unsafe fashion, without performing bound checks
The result is undefined if the row and column are out of bounds.
|
void |
validate()
Validates the internal data structure of the INDArray.
|
static StridedMatrix |
wrap(AStridedMatrix m) |
static StridedMatrix |
wrap(double[] data,
int rows,
int columns,
int offset,
int rowStride,
int columnStride) |
columnStride, get, getArrayOffset, index, rowStride, unsafeGetadd, add, addToArray, applyOpCopy, asDoubleArray, clone, diagonalProduct, elementIterator, getBand, getColumnView, getRowView, getStride, getStrides, isZero, reduce, rowDotProduct, tracegetArray, getTransposeCopybandLength, checkColumn, checkIndex, checkRow, checkSameShape, checkSameShape, checkSquare, columnCount, elementCount, getShape, getShape, getShapeClone, isSameShape, isSameShape, isSameShape, isSquare, rowCountabs, add, add, add2, addAt, addCopy, addCopy, addCopy, addCopy, addCopy, addInnerProduct, addInnerProduct, addInnerProduct, addMultiple, addMultiple, addMultiple, addOuterProduct, addOuterProduct, addRowMultiple, applyOp, applyOp, applyOp, applyOp, applyOp, asElementList, bandIndex, bandLength, bandPosition, bandStartColumn, bandStartRow, broadcast, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, checkColumnCount, checkDimension, checkRowCount, checkShape, clamp, composeWith, copy, dense, denseClone, determinant, dimensionality, divide, divide, divide, divide, elementsEqual, elementSquaredSum, elementSum, ensureMutable, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equalsByRows, equalsTranspose, exp, fill, get, get, get, getBandWrapped, getColumnClone, getColumns, getLeadingDiagonal, getLongShape, getRowClone, getRows, getSlices, getSlices, getSliceViews, hashCode, hasOrthonormalColumns, hasOrthonormalRows, hasUncountable, immutable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, inputDimensions, inverse, isBoolean, isDiagonal, isElementConstrained, isHermitian, isIdentity, isInvertible, isLowerTriangular, isOrthogonal, isOrthogonal, isPositiveDefinite, isRectangularDiagonal, isSymmetric, isUpperTriangular, isView, iterator, join, log, lowerBandwidth, lowerBandwidthLimit, mul, multiply, multiply, multiply, multiply, multiplyCopy, multiplyRow, mutable, negate, nonZeroCount, outerProduct, outputDimensions, pow, rank, reciprocal, reduce, reduceSlices, reduceSlices, reorder, reorder, replaceColumn, replaceRow, reshape, reshape, rotateView, scaleAdd, scaleAdd, set, set, set, set, set, set, set, set, setColumn, setElements, setElements, setRow, signum, slice, slice, sliceCount, sparse, sparseClone, sqrt, square, sub, sub, sub, subArray, swapColumns, swapRows, toAffineTransform, toArray, toDoubleArray, toDoubleBuffer, toMatrix, toMatrixTranspose, toMutableMatrix, toNestedDoubleArrays, toSliceArray, toString, toStringFull, toVector, transform, transform, transformInPlace, transformInPlace, transposeInnerProduct, transposeInnerProduct, transposeInPlace, upperBandwidth, upperBandwidthLimitabsCopy, add, addAt, addInnerProduct, addPower, addPower, broadcastLike, checkMutable, componentCount, density, divideCopy, elementAbsPowSum, elementMax, elementMin, elementPowSum, elementProduct, equals, equalsArray, get, get, get, get, get, getComponent, getComponents, getElements, getElements, getElements, isDense, isSparse, join, multiplyCopy, negateCopy, reciprocalCopy, scale, scaleCopy, setElements, setInnerProduct, setMultiple, setMultiple, signumCopy, sliceValue, squareCopy, sub, sub, subCopy, withComponentsfinalize, getClass, notify, notifyAll, wait, wait, waitgetArrayabs, absCopy, add, add, addAt, addCopy, addCopy, addInnerProduct, addMultiple, addOuterProduct, addPower, addPower, applyOp, applyOp, applyOp, asElementList, broadcast, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, broadcastLike, checkMutable, clamp, componentCount, copy, dense, denseClone, dimensionality, divide, divide, divideCopy, elementAbsPowSum, elementCount, elementMax, elementMin, elementPowSum, elementProduct, elementsEqual, elementSquaredSum, elementSum, ensureMutable, epsilonEquals, epsilonEquals, equals, equalsArray, exp, fill, get, get, get, get, get, get, get, get, getComponent, getComponents, getElements, getElements, getElements, getLongShape, getShape, getShape, getShapeClone, getSlices, getSlices, getSliceViews, getTransposeCopy, hasUncountable, immutable, innerProduct, innerProduct, innerProduct, innerProduct, isBoolean, isDense, isElementConstrained, isSameShape, isSparse, isView, join, join, log, multiply, multiply, multiplyCopy, multiplyCopy, mutable, negate, negateCopy, nonZeroCount, outerProduct, pow, reciprocal, reciprocalCopy, reduce, reduceSlices, reduceSlices, reorder, reorder, reshape, rotateView, scale, scaleAdd, scaleAdd, scaleCopy, 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, withComponentsforEach, spliteratorpublic static StridedMatrix create(int rowCount, int columnCount)
public boolean isFullyMutable()
INDArrayisFullyMutable in interface INDArrayisFullyMutable in class AMatrixpublic boolean isMutable()
INDArraypublic AStridedVector getRow(int i)
IMatrixgetRow in interface IMatrixgetRow in class AStridedMatrixpublic AStridedVector getColumn(int i)
IMatrixgetColumn in interface IMatrixgetColumn in class AStridedMatrixpublic void copyRowTo(int row,
double[] dest,
int destOffset)
AMatrixcopyRowTo in class AStridedMatrixrow - The index of the selected rowdest - Destination double[] arraydestOffset - Offset into destination arraypublic void copyColumnTo(int col,
double[] dest,
int destOffset)
AMatrixcopyColumnTo in class AStridedMatrixdest - Destination double[] arraypublic boolean isPackedArray()
AArrayMatrixisPackedArray in interface IStridedArrayisPackedArray in class AStridedMatrixpublic AStridedMatrix subMatrix(int rowStart, int rowCount, int colStart, int colCount)
IMatrixsubMatrix in interface IMatrixsubMatrix in class AStridedMatrixpublic void applyOp(Op op)
INDArrayapplyOp in interface INDArrayapplyOp in class AStridedMatrixpublic void getElements(double[] dest,
int destOffset)
INDArraygetElements in interface INDArraygetElements in class AMatrixpublic AStridedMatrix getTranspose()
INDArraygetTranspose in interface INDArraygetTranspose in interface IMatrixgetTranspose in class AStridedMatrixpublic AStridedMatrix getTransposeView()
INDArraygetTransposeView in interface INDArraygetTransposeView in interface IMatrixgetTransposeView in class AStridedMatrixpublic AVector asVector()
AMatrixpublic void set(int i,
int j,
double value)
INDArraypublic void unsafeSet(int i,
int j,
double value)
AMatrixunsafeSet in class AArrayMatrixpublic AMatrix exactClone()
INDArrayexactClone in interface INDArrayexactClone in class AMatrixpublic static StridedMatrix create(AMatrix m)
public static StridedMatrix wrap(AStridedMatrix m)
public static StridedMatrix wrap(double[] data, int rows, int columns, int offset, int rowStride, int columnStride)
public void validate()
INDArraypublic boolean equals(AMatrix a)
AMatrixpublic boolean equalsArray(double[] data,
int offset)
INDArrayequalsArray in interface INDArrayequalsArray in class AMatrixdata - Array of double element values to check for equalityoffset - Offset into the data arrayCopyright © 2016. All rights reserved.