public class IdentityMatrix extends ADiagonalMatrix implements IFastRows, IFastColumns
dimensions| Modifier and Type | Method and Description |
|---|---|
AMatrix |
addCopy(AMatrix m)
Adds another matrix to this matrix, returning a new matrix
|
static IdentityMatrix |
create(int i) |
double |
determinant()
Calculates the determinant of the matrix.
|
double |
diagonalProduct()
Computes the product of entries on the main diagonal of a matrix
|
double |
elementAbsPowSum(double p)
Returns the sum of the absolute values of all the elements raised to a specified power
|
double |
elementMax()
Returns the maximum element value in this array.
|
double |
elementMin()
Returns the maximum element value in this array.
|
double |
elementPowSum(double p)
Returns the sum of all the elements raised to a specified power
|
double |
elementSum()
Returns the sum of all elements in this matrix
|
IdentityMatrix |
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
|
AxisVector |
getColumn(int j)
Returns a column of the matrix.
|
AxisVector |
getColumnView(int column)
Returns a column of the matrix as a vector view.
|
double |
getDiagonalValue(int i) |
AVector |
getLeadingDiagonal()
Returns a vector view of the leading diagonal values of the matrix
|
AxisVector |
getRow(int i)
Returns a row of the matrix.
|
AxisVector |
getRowView(int row)
Returns a row of the matrix as a vector view.
|
IdentityMatrix |
getTransposeView()
Returns a transposed view of the array.
|
boolean |
hasUncountable()
Checks to see if any element in the matrix is NaN of Infinite.
|
AMatrix |
innerProduct(ADiagonalMatrix a)
Computes the inner product of this matrix with another diagonal matrix of the same shape.
|
AMatrix |
innerProduct(AMatrix a)
Computes the inner product of this matrix with another.
|
AVector |
innerProduct(AVector v)
Computes the inner product of this array with a vector
|
AMatrix |
inverse()
Computes the inverse of a matrix.
|
boolean |
isBoolean()
Returns true if the array is boolean (contains only 0.0 or 1.0 values)
|
boolean |
isIdentity()
Checks if this is an identity matrix (i.e.
|
boolean |
isMutable()
Returns true if the INDArray is mutable (at least partially)
|
boolean |
isOrthogonal()
Check to see if the matrix is orthogonal
(default tolerance: 1e-8)
|
boolean |
isOrthogonal(double tolerance)
Check to see if the matrix is orthogonal
|
boolean |
isZero()
Returns true if the matrix is the zero matrix (all components zero)
|
ScalarMatrix |
multiplyCopy(double d)
Returns a copy of the array with all elements multiplied by a single constant value
|
long |
nonZeroCount()
Returns the number of non-zero elements in the array.
|
int |
rank()
Calculate the rank of a matrix.
|
double |
rowDotProduct(int i,
AVector v)
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
|
double |
trace()
Computes the trace of a matrix, i.e.
|
void |
transform(AVector source,
AVector dest)
Transforms a source vector into a destination vector, using matrix multiplication (inner product).
|
void |
transformInPlace(ADenseArrayVector v) |
void |
transformInPlace(AVector v) |
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.
|
double |
unsafeGetDiagonalValue(int i) |
addToArray, checkIndex, checkSameShape, checkSameShape, checkSquare, clone, columnCount, copyColumnTo, copyRowTo, density, dimensions, elementSquaredSum, equalsTranspose, getBand, getNonZeroBand, getTranspose, isDiagonal, isFullyMutable, isLowerTriangular, isRectangularDiagonal, isSameShape, isSameShape, isSquare, isSymmetric, isUpperTriangular, lowerBandwidthLimit, nonZeroBand, rowCount, toDoubleArray, toMatrix, toMatrixTranspose, transform, transposeInnerProduct, transposeInPlace, upperBandwidthLimit, validateisSparse, subMatrixfill, lowerBandwidth, multiply, upperBandwidthabs, add, add, add, add, add2, addAt, addCopy, addCopy, addCopy, addCopy, addInnerProduct, addInnerProduct, addInnerProduct, addMultiple, addMultiple, addMultiple, addOuterProduct, addOuterProduct, addRowMultiple, applyOp, applyOp, applyOp, applyOp, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, asVector, bandIndex, bandLength, bandLength, bandPosition, bandStartColumn, bandStartRow, broadcast, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, checkColumn, checkColumnCount, checkDimension, checkRow, checkRowCount, checkShape, clamp, composeWith, copy, dense, denseClone, dimensionality, divide, divide, divide, divide, elementCount, elementIterator, elementsEqual, ensureMutable, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equals, equalsArray, equalsByRows, exp, get, get, get, getBandWrapped, getColumnClone, getColumns, getElements, getLongShape, getRowClone, getRows, getShape, getShape, getShapeClone, getSlices, getSlices, getSliceViews, getTransposeCopy, hashCode, hasOrthonormalColumns, hasOrthonormalRows, immutable, innerProduct, innerProduct, innerProduct, innerProduct, inputDimensions, isElementConstrained, isHermitian, isInvertible, isPositiveDefinite, isSameShape, isView, iterator, join, log, mul, multiply, multiply, multiply, multiplyRow, mutable, negate, outerProduct, outputDimensions, pow, reciprocal, reduce, 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, toDoubleBuffer, toMutableMatrix, toNestedDoubleArrays, toSliceArray, toString, toStringFull, toVector, transposeInnerProduct, unsafeSetabsCopy, add, addAt, addInnerProduct, addPower, addPower, broadcastLike, checkMutable, componentCount, divideCopy, elementProduct, equals, equalsArray, get, get, get, get, get, getComponent, getComponents, getElements, getElements, getElements, isDense, 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, columnCount, getBand, getColumnClone, getColumns, getRowClone, getRows, getTranspose, innerProduct, isDiagonal, isInvertible, isRectangularDiagonal, isSquare, isSymmetric, rowCount, subMatrix, toNestedDoubleArrays, transposeInPlaceabs, absCopy, add, add, addAt, addCopy, addCopy, addInnerProduct, addMultiple, addOuterProduct, addPower, addPower, addToArray, applyOp, applyOp, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, asVector, broadcast, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, broadcastLike, checkMutable, clamp, clone, componentCount, copy, dense, denseClone, dimensionality, divide, divide, divideCopy, elementCount, elementIterator, elementProduct, elementsEqual, elementSquaredSum, ensureMutable, epsilonEquals, epsilonEquals, equals, equalsArray, equalsArray, exp, fill, get, get, get, get, get, get, get, get, getComponent, getComponents, getElements, getElements, getElements, getElements, getLongShape, getShape, getShape, getShapeClone, getSlices, getSlices, getSliceViews, getTransposeCopy, immutable, innerProduct, innerProduct, innerProduct, isDense, isElementConstrained, isFullyMutable, isSameShape, isSparse, isView, join, join, log, multiply, multiply, 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 static IdentityMatrix create(int i)
public boolean isMutable()
INDArrayisMutable in interface INDArrayisMutable in class ADiagonalMatrixpublic boolean isBoolean()
INDArrayisBoolean in interface INDArrayisBoolean in class ADiagonalMatrixpublic boolean isZero()
AMatrixisZero in interface INDArrayisZero in class ADiagonalMatrixpublic double rowDotProduct(int i,
AVector v)
AMatrixrowDotProduct in class ADiagonalMatrixpublic double get(int i,
int j)
INDArraypublic double unsafeGet(int i,
int j)
AMatrixpublic AxisVector getRow(int i)
IMatrixpublic AxisVector getColumn(int j)
IMatrixgetColumn in interface IMatrixgetColumn in interface IFastColumnsgetColumn in class ADiagonalMatrixpublic AxisVector getRowView(int row)
IMatrixgetRowView in interface IMatrixgetRowView in class ABandedMatrixpublic AxisVector getColumnView(int column)
IMatrixgetColumnView in interface IMatrixgetColumnView in class AMatrixpublic double getDiagonalValue(int i)
getDiagonalValue in class ADiagonalMatrixpublic double unsafeGetDiagonalValue(int i)
unsafeGetDiagonalValue in class ADiagonalMatrixpublic void set(int row,
int column,
double value)
INDArraypublic void transform(AVector source, AVector dest)
IMatrixpublic void transformInPlace(AVector v)
transformInPlace in interface IMatrixtransformInPlace in class ADiagonalMatrixpublic void transformInPlace(ADenseArrayVector v)
transformInPlace in class ADiagonalMatrixpublic AVector getLeadingDiagonal()
AMatrixgetLeadingDiagonal in class ADiagonalMatrixpublic boolean isIdentity()
IMatrixisIdentity in interface IMatrixisIdentity in class ADiagonalMatrixpublic boolean isOrthogonal()
AMatrixisOrthogonal in class AMatrixpublic boolean isOrthogonal(double tolerance)
AMatrixisOrthogonal in class AMatrixtolerance - inner product of a column with all of the next columns should be less than tolerancepublic AMatrix inverse()
AMatrixpublic double determinant()
AMatrixdeterminant in class ADiagonalMatrixpublic int rank()
AMatrixrank in class ADiagonalMatrixpublic long nonZeroCount()
INDArraynonZeroCount in interface INDArraynonZeroCount in class ADiagonalMatrixpublic double elementSum()
AMatrixelementSum in interface INDArrayelementSum in class ADiagonalMatrixpublic double elementMin()
INDArrayelementMin in interface INDArrayelementMin in class ADiagonalMatrixpublic double elementMax()
INDArrayelementMax in interface INDArrayelementMax in class ADiagonalMatrixpublic double trace()
IMatrixtrace in interface IMatrixtrace in class ADiagonalMatrixpublic double diagonalProduct()
AMatrixdiagonalProduct in interface IMatrixdiagonalProduct in class ADiagonalMatrixpublic AMatrix innerProduct(ADiagonalMatrix a)
ADiagonalMatrixinnerProduct in class ADiagonalMatrixpublic AMatrix innerProduct(AMatrix a)
IMatrixinnerProduct in interface IMatrixinnerProduct in class ADiagonalMatrixpublic AVector innerProduct(AVector v)
INDArrayinnerProduct in interface INDArrayinnerProduct in interface IMatrixinnerProduct in class AMatrixv - A vectorpublic ScalarMatrix multiplyCopy(double d)
INDArraymultiplyCopy in interface INDArraymultiplyCopy in class AMatrixd - A scalar factorpublic AMatrix addCopy(AMatrix m)
IMatrixaddCopy in interface IMatrixaddCopy in class ADiagonalMatrixpublic IdentityMatrix getTransposeView()
INDArraygetTransposeView in interface INDArraygetTransposeView in interface IMatrixgetTransposeView in class ADiagonalMatrixpublic IdentityMatrix exactClone()
INDArrayexactClone in interface INDArrayexactClone in class ADiagonalMatrixpublic boolean hasUncountable()
AMatrixhasUncountable in interface INDArrayhasUncountable in class ADiagonalMatrixpublic double elementPowSum(double p)
elementPowSum in interface INDArrayelementPowSum in class ADiagonalMatrixpublic double elementAbsPowSum(double p)
elementAbsPowSum in interface INDArrayelementAbsPowSum in class ADiagonalMatrixCopyright © 2016. All rights reserved.