public final class DiagonalMatrix extends ADiagonalMatrix
dimensions| Constructor and Description |
|---|
DiagonalMatrix(int dimensions) |
| Modifier and Type | Method and Description |
|---|---|
double |
calculateElement(int i,
AVector v)
Calculates a single element of the output.
|
double |
calculateElement(int i,
Vector v) |
DiagonalMatrix |
clone()
Clones the transform, performing a deep copy where needed
|
static DiagonalMatrix |
create(AVector v) |
static DiagonalMatrix |
create(double... values) |
static DiagonalMatrix |
createDimensions(int dims) |
double |
determinant()
Calculates the determinant of the matrix.
|
double |
elementSum()
Returns the sum of all elements in the matrix
|
DiagonalMatrix |
exactClone()
Returns an exact deep clone of an array (i.e.
|
double |
get(int row,
int column)
Returns a specified element in the matrix
|
double |
getDiagonalValue(int i) |
Vector |
getLeadingDiagonal()
Returns a vector view of the leading diagonal values of the matrix
|
DiagonalMatrix |
innerProduct(ADiagonalMatrix a) |
AMatrix |
innerProduct(AMatrix a) |
DiagonalMatrix |
inverse()
Return the inverse of this transformation if possible
|
boolean |
isBoolean()
Returns true if the array is boolean (contains only 0.0 or 1.0 values)
|
boolean |
isFullyMutable()
Returns true if the INDArray is fully mutable in all positions
i.e.
|
boolean |
isIdentity()
Returns true if this transform is known to be the identity function, i.e.
|
boolean |
isMutable()
Returns true if the INDArray is mutable (at least partially)
|
void |
multiply(double factor)
Multiplies all elements of the array by a given double value
|
long |
nonZeroCount()
Returns the number of non-zero elements in the array.
|
void |
set(int row,
int column,
double value)
Sets a specified element in the matrix
|
double |
trace() |
void |
transform(Vector source,
Vector dest) |
void |
transformInPlace(AArrayVector v) |
void |
transformInPlace(AVector v)
Transforms a vector destructively.
|
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.
|
double |
unsafeGetDiagonalValue(int i) |
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.
|
void |
validate()
Validates the internal data structure of the INDArray.
|
static DiagonalMatrix |
wrap(double[] data) |
columnCount, copyColumnTo, copyRowTo, density, dimensions, getBand, getTranspose, getTransposeView, innerProduct, isDiagonal, isLowerTriangular, isRectangularDiagonal, isSquare, isSymmetric, isUpperTriangular, lowerBandwidthLimit, rowCount, toMatrix, toMatrixTranspose, transposeInnerProduct, transposeInPlace, upperBandwidthLimitelementSquaredSum, fill, getRow, lowerBandwidth, upperBandwidthabs, add, add, add, add, add, addAt, addMultiple, addRowMultiple, applyOp, applyOp, asDoubleArray, asElementList, asVector, bandIndex, bandLength, bandLength, bandPosition, broadcast, broadcastCloneLike, broadcastLike, broadcastLike, clamp, cloneRow, compose, compose, composeWith, composeWith, copyOfMatrix, copyOfTranslationVector, copyTo, dimensionality, divide, divide, elementCount, elementDiv, elementIterator, elementMul, ensureMutable, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equals, equals, exp, get, get, get, getBandWrapped, getColumn, getElements, getLongShape, getMatrixComponent, getShape, getShape, getSlices, getSliceViews, getTransposeCopy, hashCode, hasOrthonormalColumns, hassOrthonormalRows, innerProduct, innerProduct, innerProduct, innerProduct, inputDimensions, isElementConstrained, isHermitian, isInvertible, isOrthogonal, isPositiveDefinite, isSameShape, isSameShape, isView, isZero, iterator, log, mul, multiply, multiplyRow, negate, outerProduct, outputDimensions, pow, reciprocal, reshape, reshape, scale, scaleAdd, set, set, set, set, set, set, setColumn, setElements, setElements, setRow, signum, slice, slice, sliceCount, sqrt, square, sub, sub, sub, sub, sub, subMatrix, swapColumns, swapRows, toAffineTransform, toArray, toDoubleArray, toDoubleBuffer, toMutableMatrix, toString, toVector, transform, transform, transform, transposeInnerProductgetTranslationComponent, isLinearcompose, transformNormaltakeComponents, takeComponents, takeComponentspublic static DiagonalMatrix createDimensions(int dims)
public static DiagonalMatrix create(double... values)
public static DiagonalMatrix create(AVector v)
public static DiagonalMatrix wrap(double[] data)
public double elementSum()
AMatrixelementSum in interface INDArrayelementSum in class ABandedMatrixpublic long nonZeroCount()
INDArraynonZeroCount in interface INDArraynonZeroCount in class ABandedMatrixpublic double get(int row,
int column)
AMatrixpublic double unsafeGet(int row,
int column)
AMatrixpublic void set(int row,
int column,
double value)
AMatrixpublic void unsafeSet(int row,
int column,
double value)
AMatrixpublic boolean isMutable()
INDArrayisMutable in interface INDArrayisMutable in class ADiagonalMatrixpublic boolean isFullyMutable()
INDArrayisFullyMutable in interface INDArrayisFullyMutable in class ADiagonalMatrixpublic void multiply(double factor)
INDArraypublic double calculateElement(int i,
AVector v)
ATransformcalculateElement in class ADiagonalMatrixpublic double calculateElement(int i,
Vector v)
calculateElement in class AMatrixpublic void transform(Vector source, Vector dest)
transform in class ADiagonalMatrixpublic void transformInPlace(AVector v)
ATransformtransformInPlace in class ADiagonalMatrixpublic void transformInPlace(AArrayVector v)
transformInPlace in class ADiagonalMatrixpublic boolean isIdentity()
ATransformisIdentity in class ADiagonalMatrixpublic boolean isBoolean()
INDArrayisBoolean in interface INDArrayisBoolean in class ADiagonalMatrixpublic DiagonalMatrix clone()
ATransformpublic double determinant()
AMatrixdeterminant in class ADiagonalMatrixpublic DiagonalMatrix inverse()
ATransformpublic double getDiagonalValue(int i)
getDiagonalValue in class ADiagonalMatrixpublic double unsafeGetDiagonalValue(int i)
unsafeGetDiagonalValue in class ADiagonalMatrixpublic Vector getLeadingDiagonal()
AMatrixgetLeadingDiagonal in class AMatrixpublic AMatrix innerProduct(AMatrix a)
innerProduct in class ADiagonalMatrixpublic DiagonalMatrix innerProduct(ADiagonalMatrix a)
innerProduct in class ADiagonalMatrixpublic DiagonalMatrix exactClone()
INDArrayexactClone in interface INDArrayexactClone in class AMatrixpublic void validate()
INDArrayvalidate in interface INDArrayvalidate in class ADiagonalMatrixCopyright © 2013. All Rights Reserved.