public final class StridedRowMatrix extends AStridedMatrix
datacols, 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....]
|
int |
columnStride()
Gets the column stride for this strided matrix.
|
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
|
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
|
double |
get(int i,
int j)
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
|
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.
|
protected int |
index(int i,
int j)
Computes the index into the underlying data array for a given position in this array-backed matrix
|
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
|
double |
rowDotProduct(int row,
AVector v)
Returns the dot product of a specific row with a vector.
|
int |
rowStride()
Gets the row stride for this strided matrix.
|
void |
set(int i,
int j,
double value)
Sets a value at a given position in a mutable 2D array
|
void |
setRow(int row,
AVector v)
Sets a row in a matrix to the value specified by the given vector
|
AStridedMatrix |
subMatrix(int rowStart,
int rowCount,
int colStart,
int colCount)
Gets a rectangular submatrix view of part of a matrix
|
double |
unsafeGet(int i,
int j)
Gets an element 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 |
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 StridedRowMatrix |
wrap(AStridedMatrix m) |
static StridedRowMatrix |
wrap(double[] data,
int rows,
int columns,
int offset,
int rowStride) |
add, add, addToArray, applyOpCopy, asDoubleArray, clone, diagonalProduct, elementIterator, getBand, getColumnView, getRowView, getStride, getStrides, isZero, reduce, 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, 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 final double get(int i,
int j)
INDArraypublic final void set(int i,
int j,
double value)
INDArraypublic final double unsafeGet(int i,
int j)
AMatrixunsafeGet in class AArrayMatrixpublic final void unsafeSet(int i,
int j,
double value)
AMatrixunsafeSet in class AArrayMatrixpublic 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 double rowDotProduct(int row,
AVector v)
AMatrixrowDotProduct in class AStridedMatrixpublic void setRow(int row,
AVector v)
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 AMatrix exactClone()
INDArrayexactClone in interface INDArrayexactClone in class AMatrixpublic static StridedRowMatrix wrap(AStridedMatrix m)
public static StridedRowMatrix wrap(double[] data, int rows, int columns, int offset, int rowStride)
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 arraypublic int getArrayOffset()
IStridedArraygetArrayOffset in interface IStridedArraygetArrayOffset in class AStridedMatrixpublic int rowStride()
AStridedMatrixrowStride in class AStridedMatrixpublic int columnStride()
AStridedMatrixcolumnStride in class AStridedMatrixprotected int index(int i,
int j)
AArrayMatrixindex in class AArrayMatrixCopyright © 2016. All rights reserved.