public class VectorMatrixMN extends AVectorMatrix<AVector>
| Modifier and Type | Field and Description |
|---|---|
protected AVector[] |
rowData |
cols, rows| Modifier | Constructor and Description |
|---|---|
protected |
VectorMatrixMN(AVector... rows) |
|
VectorMatrixMN(int rowCount,
int columnCount) |
| 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 |
applyOp(Op op)
Applies a unary operator to all elements of the array (in-place)
|
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.
|
static VectorMatrixMN |
create(AMatrix source) |
static VectorMatrixMN |
create(List<?> rows)
Create a matrix from a list of rows
|
static VectorMatrixMN |
create(List<?> rows,
int[] shape) |
VectorMatrixMN |
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 |
getRow(int row)
Gets a row of the matrix.
|
void |
multiply(double factor)
Multiplies all elements of the array in place by a given double value
|
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
|
void |
swapRows(int i,
int j)
Swaps two rows of the matrix in place
This is an elementary row operation
|
void |
transform(AVector source,
AVector dest)
Transforms a source vector into a destination vector, using matrix multiplication (inner product).
|
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 VectorMatrixMN |
wrap(AMatrix source) |
static VectorMatrixMN |
wrap(AVector[] rows) |
asVector, componentCount, copyColumnTo, copyRowTo, elementSquaredSum, elementSum, equals, fill, getComponent, getElements, getRowView, innerProduct, isBoolean, isFullyMutable, isView, isZero, nonZeroCount, subMatrix, transformbandLength, 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, 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, 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, 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, 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, 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, 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, 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, spliteratorprotected final AVector[] rowData
public VectorMatrixMN(int rowCount,
int columnCount)
protected VectorMatrixMN(AVector... rows)
public static VectorMatrixMN create(List<?> rows)
rows - public static VectorMatrixMN create(List<?> rows, int[] shape)
public static VectorMatrixMN wrap(AVector[] rows)
public void multiply(double factor)
INDArraypublic void applyOp(Op op)
INDArrayapplyOp in interface INDArrayapplyOp in class AVectorMatrix<AVector>public static VectorMatrixMN create(AMatrix source)
public static VectorMatrixMN wrap(AMatrix source)
public void replaceRow(int i,
AVector row)
AVectorMatrixreplaceRow in class AVectorMatrix<AVector>public void swapRows(int i,
int j)
AMatrixpublic AVector getRow(int row)
AVectorMatrixpublic double get(int row,
int column)
INDArraypublic void set(int row,
int column,
double value)
INDArraypublic double unsafeGet(int row,
int column)
AMatrixunsafeGet in class AVectorMatrix<AVector>public void unsafeSet(int row,
int column,
double value)
AMatrixunsafeSet in class AVectorMatrix<AVector>public void addAt(int i,
int j,
double d)
IMatrixpublic void transform(AVector source, AVector dest)
IMatrixtransform in interface IMatrixtransform in class AVectorMatrix<AVector>public double rowDotProduct(int i,
AVector inputVector)
AMatrixrowDotProduct in class AVectorMatrix<AVector>public Matrix clone()
INDArrayclone in interface INDArrayclone in class AVectorMatrix<AVector>public VectorMatrixMN exactClone()
INDArrayexactClone in interface INDArrayexactClone in class AMatrixCopyright © 2016. All rights reserved.