public abstract class AVectorMatrix<T extends AVector> extends ARectangularMatrix implements IFastRows
cols, rows| Modifier | Constructor and Description |
|---|---|
protected |
AVectorMatrix(int rows,
int cols) |
| 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....]
|
AMatrix |
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.
|
int |
componentCount()
Returns the number of components of this array.
|
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 |
elementSquaredSum()
Returns the squared sum of all elements in this matrix
|
double |
elementSum()
Returns the sum of all elements in this matrix
|
boolean |
equals(AMatrix m)
Returns true if this matrix is exactly equal to another matrix
|
void |
fill(double value)
Fills this array with a single double value.
|
double |
get(int row,
int column)
Returns the double value at the specified position in a 2D matrix
|
AVector |
getComponent(int i)
Gets a component from the array at the specified index
Will throw an error if components are not supported, or if the component is out of bounds as defined by 0 <= k |
void |
getElements(double[] dest,
int destOffset)
Gets all elements of the array, copying them into a double array at the specified offset
|
abstract T |
getRow(int row)
Gets a row of the matrix.
|
T |
getRowView(int i)
Returns a row of the matrix as a vector view.
|
AVector |
innerProduct(AVector v)
Computes the inner product of this array with a vector
|
boolean |
isBoolean()
Returns true if the array is boolean (contains only 0.0 or 1.0 values)
|
boolean |
isFullyMutable()
If this method returns true, the INDArray is guaranteed to be fully mutable
in all positions i.e.
|
boolean |
isView()
Return true if this array is considered as a view type.
|
boolean |
isZero()
Returns true if the matrix is the zero matrix (all components zero)
|
long |
nonZeroCount()
Returns the number of non-zero elements in the array.
|
abstract void |
replaceRow(int i,
AVector row)
Replaces a row in this matrix.
|
double |
rowDotProduct(int i,
AVector inputVector)
Returns the dot product of a specific row with a vector.
|
void |
set(int row,
int column,
double value)
Sets a value at a given position in a mutable 2D array
|
AMatrix |
subMatrix(int rowStart,
int rows,
int colStart,
int cols)
Gets a rectangular submatrix view of part of a matrix
|
void |
transform(AVector source,
AVector dest)
Transforms a source vector into a destination vector, using matrix multiplication (inner product).
|
void |
transform(Vector source,
Vector dest) |
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.
|
bandLength, checkColumn, checkIndex, checkRow, checkSameShape, checkSameShape, checkSquare, columnCount, elementCount, getShape, getShape, getShapeClone, isSameShape, isSameShape, isSameShape, isSquare, rowCountabs, add, add, add, add, add2, addAt, addCopy, addCopy, addCopy, addCopy, addCopy, addInnerProduct, addInnerProduct, addInnerProduct, addMultiple, addMultiple, addMultiple, addOuterProduct, addOuterProduct, addRowMultiple, addToArray, applyOp, applyOp, applyOp, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, bandIndex, bandLength, bandPosition, bandStartColumn, bandStartRow, broadcast, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, checkColumnCount, checkDimension, checkRowCount, checkShape, clamp, composeWith, copy, dense, denseClone, determinant, diagonalProduct, dimensionality, divide, divide, divide, divide, elementIterator, elementsEqual, ensureMutable, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equalsArray, equalsByRows, equalsTranspose, exactClone, exp, get, get, get, getBand, getBandWrapped, getColumn, getColumnClone, getColumns, getColumnView, getLeadingDiagonal, getLongShape, getRowClone, getRows, getSlices, getSlices, getSliceViews, getTranspose, getTransposeCopy, getTransposeView, hashCode, hasOrthonormalColumns, hasOrthonormalRows, hasUncountable, immutable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, inputDimensions, inverse, isDiagonal, isElementConstrained, isHermitian, isIdentity, isInvertible, isLowerTriangular, isMutable, isOrthogonal, isOrthogonal, isPositiveDefinite, isRectangularDiagonal, isSymmetric, isUpperTriangular, iterator, join, log, lowerBandwidth, lowerBandwidthLimit, mul, multiply, multiply, multiply, multiply, multiplyCopy, multiplyRow, mutable, negate, outerProduct, outputDimensions, pow, rank, reciprocal, reduce, reduce, reduceSlices, reduceSlices, reorder, reorder, replaceColumn, 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, trace, transformInPlace, transformInPlace, transposeInnerProduct, transposeInnerProduct, transposeInPlace, upperBandwidth, upperBandwidthLimit, validateabsCopy, add, addAt, addInnerProduct, addPower, addPower, broadcastLike, checkMutable, density, divideCopy, elementAbsPowSum, elementMax, elementMin, elementPowSum, elementProduct, equals, equalsArray, get, get, get, get, get, 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, waitadd2, addAt, addCopy, addCopy, columnCount, diagonalProduct, getBand, getColumn, getColumnClone, getColumns, getColumnView, getRowClone, getRows, getTranspose, getTransposeView, innerProduct, innerProduct, inverse, isDiagonal, isIdentity, isInvertible, isRectangularDiagonal, isSquare, isSymmetric, rowCount, toNestedDoubleArrays, trace, transformInPlace, transposeInPlaceabs, absCopy, add, add, addAt, addCopy, addCopy, addInnerProduct, addMultiple, addOuterProduct, addPower, addPower, addToArray, applyOp, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, broadcast, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, broadcastLike, checkMutable, clamp, copy, dense, denseClone, dimensionality, divide, divide, divideCopy, elementAbsPowSum, elementCount, elementIterator, elementMax, elementMin, elementPowSum, elementProduct, elementsEqual, ensureMutable, epsilonEquals, epsilonEquals, equals, equalsArray, equalsArray, exactClone, exp, get, get, get, get, get, get, get, get, getComponents, getElements, getElements, getElements, getLongShape, getShape, getShape, getShapeClone, getSlices, getSlices, getSliceViews, getTransposeCopy, hasUncountable, immutable, innerProduct, innerProduct, innerProduct, isDense, isElementConstrained, isMutable, isSameShape, isSparse, join, join, log, multiply, multiply, multiplyCopy, multiplyCopy, mutable, negate, negateCopy, outerProduct, pow, reciprocal, reciprocalCopy, reduce, 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, validate, withComponentsforEach, spliteratorpublic abstract void replaceRow(int i,
AVector row)
replaceRow in class AMatrixi - row - public abstract T getRow(int row)
public final T getRowView(int i)
IMatrixgetRowView in interface IMatrixgetRowView in class AMatrixpublic double get(int row,
int column)
INDArraypublic double unsafeGet(int row,
int column)
AMatrixpublic boolean isFullyMutable()
INDArrayisFullyMutable in interface INDArrayisFullyMutable in class AMatrixpublic void fill(double value)
INDArraypublic void set(int row,
int column,
double value)
INDArraypublic void unsafeSet(int row,
int column,
double value)
AMatrixpublic void transform(AVector source, AVector dest)
IMatrixpublic double rowDotProduct(int i,
AVector inputVector)
AMatrixrowDotProduct in class AMatrixpublic void copyRowTo(int row,
double[] dest,
int destOffset)
AMatrixpublic void copyColumnTo(int col,
double[] dest,
int destOffset)
AMatrixcopyColumnTo in class AMatrixdest - Destination double[] arraypublic final void getElements(double[] dest,
int destOffset)
INDArraygetElements in interface INDArraygetElements in class AMatrixpublic void applyOp(Op op)
INDArraypublic boolean isView()
INDArraypublic boolean isZero()
AMatrixpublic boolean isBoolean()
INDArraypublic double elementSum()
AMatrixelementSum in interface INDArrayelementSum in class AMatrixpublic double elementSquaredSum()
AMatrixelementSquaredSum in interface INDArrayelementSquaredSum in class AMatrixpublic long nonZeroCount()
INDArraynonZeroCount in interface INDArraynonZeroCount in class AMatrixpublic AVector asVector()
AMatrixpublic int componentCount()
INDArraycomponentCount in interface INDArraycomponentCount in class AbstractArray<AVector>public AVector getComponent(int i)
INDArraygetComponent in interface INDArraygetComponent in class AbstractArray<AVector>public AVector innerProduct(AVector v)
INDArrayinnerProduct in interface INDArrayinnerProduct in interface IMatrixinnerProduct in class AMatrixv - A vectorpublic AMatrix subMatrix(int rowStart, int rows, int colStart, int cols)
IMatrixpublic boolean equals(AMatrix m)
AMatrixpublic AMatrix clone()
INDArrayCopyright © 2016. All rights reserved.