public class RowMatrix extends ARectangularMatrix implements IFastColumns, IFastRows
cols, rows| Modifier and Type | Method and Description |
|---|---|
void |
addAt(int i,
int j,
double d)
Adds a value at a specific position in the matrix, mutating the matrix
Does not perform bounds checking - this in an unsafe operation
|
void |
addToArray(double[] data,
int offset)
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)
|
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
|
double |
elementMax()
Returns the maximum element value in this array.
|
double |
elementMin()
Returns the maximum element value in this array.
|
double |
elementSquaredSum()
Returns the squared sum of all elements in this matrix
|
double |
elementSum()
Returns the sum of all elements in this 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
|
RowMatrix |
exactClone()
Creates a deep clone of an array, using the same class implementation as the original array
|
double |
get(int row,
int column)
Returns the double value at the specified position in a 2D matrix
|
AVector |
getColumnView(int i)
Returns a column of the matrix as a vector view.
|
void |
getElements(double[] data,
int offset)
Gets all elements of the array, copying them into a double array at the specified offset
|
AVector |
getRowView(int i)
Returns a row of the matrix as a vector view.
|
ColumnMatrix |
getTranspose()
Returns the transpose of this array.
|
ColumnMatrix |
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 |
isZero()
Returns true if the matrix is the zero matrix (all components zero)
|
void |
multiply(double factor)
Multiplies all elements of the array in place by a given double value
|
long |
nonZeroCount()
Returns the number of non-zero elements in the array.
|
double |
reduce(Op2 op,
double init)
Reduces over all elements of the array in row-major order.
|
void |
set(int row,
int column,
double value)
Sets a value at a given position in a mutable 2D array
|
Vector |
toVector()
Coerces the array into a flattened dense Vector, in row-major order
May return the same array if it is already a Vector instance
|
Matrix |
transposeInnerProduct(Matrix s) |
double |
unsafeGet(int row,
int column)
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 row,
int column,
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.
|
static RowMatrix |
wrap(AVector v) |
bandLength, checkColumn, checkIndex, checkRow, checkSameShape, checkSameShape, checkSquare, columnCount, elementCount, getShape, getShape, getShapeClone, isSameShape, isSameShape, isSameShape, isSquare, rowCountabs, add, add, add, add, add2, addCopy, addCopy, addCopy, addCopy, addCopy, addInnerProduct, addInnerProduct, addInnerProduct, addMultiple, addMultiple, addMultiple, addOuterProduct, addOuterProduct, addRowMultiple, applyOp, applyOp, applyOp, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, bandIndex, bandLength, bandPosition, bandStartColumn, bandStartRow, broadcast, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, checkColumnCount, checkDimension, checkRowCount, checkShape, clamp, clone, composeWith, copy, dense, denseClone, determinant, diagonalProduct, dimensionality, divide, divide, divide, divide, elementIterator, elementsEqual, ensureMutable, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equals, equalsByRows, equalsTranspose, exp, fill, get, get, get, getBand, getBandWrapped, getColumn, getColumnClone, getColumns, getLeadingDiagonal, getLongShape, getRow, getRowClone, getRows, getSlices, getSlices, getSliceViews, getTransposeCopy, 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, multiplyCopy, multiplyRow, mutable, negate, outerProduct, outputDimensions, pow, rank, reciprocal, reduce, reduceSlices, reduceSlices, reorder, reorder, replaceColumn, replaceRow, reshape, reshape, rotateView, rowDotProduct, 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, subMatrix, swapColumns, swapRows, toAffineTransform, toArray, toDoubleArray, toDoubleBuffer, toMatrix, toMatrixTranspose, toMutableMatrix, toNestedDoubleArrays, toSliceArray, toString, toStringFull, trace, transform, transform, transformInPlace, transformInPlace, transposeInnerProduct, transposeInPlace, upperBandwidth, upperBandwidthLimit, validateabsCopy, add, addAt, addInnerProduct, addPower, addPower, broadcastLike, checkMutable, componentCount, density, divideCopy, elementAbsPowSum, 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, waitgetColumnadd2, addCopy, addCopy, columnCount, diagonalProduct, getBand, getColumnClone, getColumns, getRowClone, getRows, innerProduct, innerProduct, innerProduct, inverse, isDiagonal, isIdentity, isInvertible, isRectangularDiagonal, isSquare, isSymmetric, rowCount, subMatrix, toNestedDoubleArrays, trace, transform, transformInPlace, transposeInPlaceabs, absCopy, add, add, addAt, addCopy, addCopy, addInnerProduct, addMultiple, addOuterProduct, addPower, addPower, applyOp, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, broadcast, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, broadcastLike, checkMutable, clamp, clone, componentCount, copy, dense, denseClone, dimensionality, divide, divide, divideCopy, elementAbsPowSum, elementCount, elementIterator, elementPowSum, elementProduct, elementsEqual, 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, isBoolean, isDense, isElementConstrained, isSameShape, isSparse, isView, join, join, log, multiply, multiplyCopy, multiplyCopy, mutable, negate, negateCopy, 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, validate, withComponentsforEach, spliteratorpublic RowMatrix(AVector v)
public boolean isFullyMutable()
INDArrayisFullyMutable in interface INDArrayisFullyMutable in class AMatrixpublic boolean isMutable()
INDArraypublic boolean isZero()
AMatrixpublic Vector toVector()
INDArraypublic AVector asVector()
AMatrixpublic void multiply(double factor)
INDArraypublic void applyOp(Op op)
INDArraypublic double reduce(Op2 op, double init)
INDArraypublic double elementSum()
AMatrixelementSum in interface INDArrayelementSum in class AMatrixpublic double elementSquaredSum()
AMatrixelementSquaredSum in interface INDArrayelementSquaredSum in class AMatrixpublic double elementMin()
INDArrayelementMin in interface INDArrayelementMin in class AbstractArray<AVector>public double elementMax()
INDArrayelementMax in interface INDArrayelementMax in class AbstractArray<AVector>public long nonZeroCount()
INDArraynonZeroCount in interface INDArraynonZeroCount in class AMatrixpublic double get(int row,
int column)
INDArraypublic void set(int row,
int column,
double value)
INDArraypublic double unsafeGet(int row,
int column)
AMatrixpublic void unsafeSet(int row,
int column,
double value)
AMatrixpublic AVector getRowView(int i)
IMatrixgetRowView in interface IMatrixgetRowView in class AMatrixpublic AVector getColumnView(int i)
IMatrixgetColumnView in interface IMatrixgetColumnView in class AMatrixpublic void addAt(int i,
int j,
double d)
IMatrixpublic void addToArray(double[] data,
int offset)
INDArrayaddToArray in interface INDArrayaddToArray in class AMatrixpublic ColumnMatrix getTranspose()
INDArraygetTranspose in interface INDArraygetTranspose in interface IMatrixgetTranspose in class AMatrixpublic ColumnMatrix getTransposeView()
INDArraygetTransposeView in interface INDArraygetTransposeView in interface IMatrixgetTransposeView in class AMatrixpublic RowMatrix exactClone()
INDArrayexactClone in interface INDArrayexactClone in class 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 void copyRowTo(int row,
double[] dest,
int destOffset)
AMatrixpublic void copyColumnTo(int col,
double[] dest,
int destOffset)
AMatrixcopyColumnTo in class AMatrixdest - Destination double[] arraypublic void getElements(double[] data,
int offset)
INDArraygetElements in interface INDArraygetElements in class AMatrixpublic Matrix transposeInnerProduct(Matrix s)
transposeInnerProduct in class AMatrixCopyright © 2016. All rights reserved.