public interface DiagonalMatrix extends Matrix
Modifier and Type | Method and Description |
---|---|
DiagonalMatrix |
dotTimes(Matrix matrix)
Element-wise multiplication of
this and other |
double[] |
getDiagonal()
Gets the data along the diagonal
|
int |
getDimensionality()
Gets the dimensionality of this square matrix, which is equal to either
the number of rows or the number of columns
|
double |
getElement(int index)
Gets the zero-based index diagonal element into the diagonal matrix
|
DiagonalMatrix |
inverse()
Computes the full-blown inverse of
this , which must be a
square matrix |
DiagonalMatrix |
pseudoInverse()
Computes the effective pseudo-inverse of
this , using a
rather expensive procedure (SVD) |
DiagonalMatrix |
pseudoInverse(double effectiveZero)
Computes the effective pseudo-inverse of
this , using a
rather expensive procedure (SVD) |
void |
setElement(int index,
double value)
Sets the zero-based index diagonal element into the diagonal matrix
|
DiagonalMatrix |
times(DiagonalMatrix matrix)
Multiplies this by the given DiagonalMatrix, leaving this unmodified
|
void |
timesEquals(DiagonalMatrix matrix)
Multiplies this by the other diagonal matrix, stores the result in this
|
assertMultiplicationDimensions, assertSameDimensions, checkMultiplicationDimensions, checkSameDimensions, clone, convertFromVector, convertToVector, decrement, decrement, dotDivide, dotDivideEquals, get, getColumn, getElement, getEntryCount, getMatrixFactory, getNumColumns, getNumRows, getRow, getSubMatrix, identity, increment, increment, isSparse, isSquare, isSymmetric, isSymmetric, logDeterminant, normFrobenius, normFrobeniusSquared, rank, rank, set, setColumn, setElement, setRow, setSubMatrix, solve, solve, sumOfColumns, sumOfRows, times, times, toArray, toString, toString, trace, transpose, valuesAsList
dotTimesEquals, equals, equals, isZero, isZero, minus, minusEquals, negative, negativeEquals, plus, plusEquals, scale, scaledMinus, scaledMinusEquals, scaledPlus, scaledPlusEquals, scaleEquals, zero
double[] getDiagonal()
double getElement(int index)
index
- Zero-based index into the diagonal to getvoid setElement(int index, double value)
index
- Zero-based index into the diagonal to setvalue
- Value to setint getDimensionality()
DiagonalMatrix dotTimes(Matrix matrix)
Ring
this
and other
DiagonalMatrix times(DiagonalMatrix matrix)
matrix
- DigonalMatrix to multiply thisvoid timesEquals(DiagonalMatrix matrix)
matrix
- Diagonal matrix to multiply this byDiagonalMatrix pseudoInverse()
Matrix
this
, using a
rather expensive procedure (SVD)pseudoInverse
in interface Matrix
this
DiagonalMatrix pseudoInverse(double effectiveZero)
Matrix
this
, using a
rather expensive procedure (SVD)pseudoInverse
in interface Matrix
effectiveZero
- effective zero to pass along to the SVDthis
DiagonalMatrix inverse()
Matrix
this
, which must be a
square matrix