public abstract class AStridedMatrix extends AArrayMatrix implements IStridedArray
datacols, rows| Modifier | Constructor and Description |
|---|---|
protected |
AStridedMatrix(double[] data,
int rows,
int cols) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(AMatrix m)
Adds another matrix to this matrix.
|
void |
add(AVector v)
Adds a vector to every row of this matrix.
|
void |
addToArray(double[] dest,
int destOffset)
Adds all the elements of this array to a double array, in row-major order
|
void |
applyOp(Op op)
Applies a unary operator to all elements of the array (in-place)
|
Matrix |
applyOpCopy(Op op)
Applies a unary operator to all elements of the array (creating a new array)
|
double[] |
asDoubleArray()
Returns the underlying double array representing the densely packed elements of this array
Returns null if there is no such array
|
Matrix |
clone()
Returns a clone of the array data, as a new array which will be fully mutable
and may be of a different class to the original.
|
abstract int |
columnStride()
Gets the column stride for this strided matrix.
|
abstract void |
copyColumnTo(int col,
double[] dest,
int destOffset)
Copies the elements in a selected row of this matrix to a double array
|
abstract void |
copyRowTo(int row,
double[] dest,
int destOffset)
Copies the elements in a slected row of this matrix to a double array
|
double |
diagonalProduct()
Computes the product of entries on the main diagonal of a matrix
|
Iterator<Double> |
elementIterator()
Returns an iterator over all elements in this array, in row-major order
|
abstract int |
getArrayOffset()
Gets the data array offset for the first element of this strided array
|
AStridedVector |
getBand(int i)
Gets a specific band of the matrix, as a view vector.
|
AStridedVector |
getColumn(int i)
Returns a column of the matrix.
|
AStridedVector |
getColumnView(int i)
Returns a column of the matrix as a vector view.
|
AStridedVector |
getRow(int i)
Returns a row of the matrix.
|
AStridedVector |
getRowView(int i)
Returns a row of the matrix as a vector view.
|
int |
getStride(int dimension)
Gets the stide for a specific dimension in this strided array.
|
int[] |
getStrides()
Gets the strides for each dimension of this strided array.
|
AStridedMatrix |
getTranspose()
Returns the transpose of this array.
|
AStridedMatrix |
getTransposeView()
Returns a transposed view of the array.
|
boolean |
isPackedArray()
Returns true if the data array is fully packed by this matrix in row-major order
|
boolean |
isZero()
Returns true if the matrix is the zero matrix (all components zero)
|
double |
reduce(Op2 op,
double init)
Reduces over all elements of the array in row-major order.
|
double |
rowDotProduct(int i,
AVector a)
Returns the dot product of a specific row with a vector.
|
abstract int |
rowStride()
Gets the row stride for this strided matrix.
|
AStridedMatrix |
subMatrix(int rowStart,
int rowCount,
int colStart,
int colCount)
Gets a rectangular submatrix view of part of a matrix
|
double |
trace()
Computes the trace of a matrix, i.e.
|
get, getArray, getTransposeCopy, index, set, unsafeGet, unsafeSetbandLength, 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, asVector, 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, equals, equalsArray, equalsByRows, equalsTranspose, exactClone, exp, fill, get, get, get, getBandWrapped, getColumnClone, getColumns, getElements, getLeadingDiagonal, getLongShape, getRowClone, getRows, getSlices, getSlices, getSliceViews, hashCode, hasOrthonormalColumns, hasOrthonormalRows, hasUncountable, immutable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, inputDimensions, inverse, isBoolean, isDiagonal, isElementConstrained, isFullyMutable, isHermitian, isIdentity, isInvertible, isLowerTriangular, isMutable, 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, upperBandwidthLimit, validateabsCopy, 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, asVector, 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, equalsArray, exactClone, exp, fill, get, get, get, get, get, get, get, get, get, getComponent, getComponents, getElements, getElements, getElements, getElements, getLongShape, getShape, getShape, getShapeClone, getSlices, getSlices, getSliceViews, getTransposeCopy, hasUncountable, immutable, innerProduct, innerProduct, innerProduct, innerProduct, isBoolean, isDense, isElementConstrained, isFullyMutable, isMutable, 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, 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, spliteratorpublic abstract int getArrayOffset()
IStridedArraygetArrayOffset in interface IStridedArraypublic abstract int rowStride()
public abstract int columnStride()
public AStridedMatrix subMatrix(int rowStart, int rowCount, int colStart, int colCount)
IMatrixpublic AStridedVector getRow(int i)
IMatrixpublic AStridedVector getColumn(int i)
IMatrixpublic AStridedVector getRowView(int i)
IMatrixgetRowView in interface IMatrixgetRowView in class AMatrixpublic final AStridedVector getColumnView(int i)
IMatrixgetColumnView in interface IMatrixgetColumnView in class AMatrixpublic double diagonalProduct()
AMatrixdiagonalProduct in interface IMatrixdiagonalProduct in class AMatrixpublic double trace()
IMatrixpublic AStridedVector getBand(int i)
AMatrixpublic void add(AVector v)
AMatrixpublic void addToArray(double[] dest,
int destOffset)
INDArrayaddToArray in interface INDArrayaddToArray in class AMatrixpublic void applyOp(Op op)
INDArraypublic final Matrix applyOpCopy(Op op)
INDArrayapplyOpCopy in interface INDArrayapplyOpCopy in class AMatrixpublic double reduce(Op2 op, double init)
INDArraypublic double rowDotProduct(int i,
AVector a)
AMatrixrowDotProduct in class AMatrixpublic void add(AMatrix m)
AMatrixpublic abstract void copyRowTo(int row,
double[] dest,
int destOffset)
AMatrixpublic abstract void copyColumnTo(int col,
double[] dest,
int destOffset)
AMatrixcopyColumnTo in class AMatrixdest - Destination double[] arraypublic int[] getStrides()
IStridedArraygetStrides in interface IStridedArraypublic int getStride(int dimension)
IStridedArraygetStride in interface IStridedArraypublic Iterator<Double> elementIterator()
INDArrayelementIterator in interface INDArrayelementIterator in class AMatrixpublic AStridedMatrix getTranspose()
INDArraygetTranspose in interface INDArraygetTranspose in interface IMatrixgetTranspose in class AMatrixpublic AStridedMatrix getTransposeView()
INDArraygetTransposeView in interface INDArraygetTransposeView in interface IMatrixgetTransposeView in class AMatrixpublic boolean isPackedArray()
AArrayMatrixisPackedArray in interface IStridedArrayisPackedArray in class AArrayMatrixpublic double[] asDoubleArray()
INDArrayasDoubleArray in interface INDArrayasDoubleArray in class AMatrixpublic boolean isZero()
AMatrixpublic final Matrix clone()
INDArrayCopyright © 2016. All rights reserved.