public class DiagonalMatrix extends AbstractRealMatrix implements SymmetricMatrix, Serializable
MathUnsupportedOperationException.
This class is up-to-date with commons-math 3.6.1.
| Constructor and Description |
|---|
DiagonalMatrix(double[] d)
Creates a matrix using the input array as the underlying data.
|
DiagonalMatrix(double[] d,
boolean copyArray)
Creates a matrix using the input array as the underlying data.
|
DiagonalMatrix(int dimension)
Creates a matrix with the supplied dimension.
|
| Modifier and Type | Method and Description |
|---|---|
DiagonalMatrix |
add(DiagonalMatrix m)
Compute the sum of
this and m. |
RealMatrix |
add(RealMatrix m)
Returns the sum of
this and m. |
SymmetricMatrix |
add(SymmetricMatrix m)
Adds a
SymmetricMatrix to this matrix. |
void |
addToEntry(int row,
int column,
double increment)
Adds (in place) the specified value to the specified entry of
this matrix. |
DiagonalMatrix |
copy()
Returns a (deep) copy of this.
|
void |
copySubMatrix(int[] selectedRows,
int[] selectedColumns,
double[][] destination)
Copy a submatrix.
|
void |
copySubMatrix(int startRow,
int endRow,
int startColumn,
int endColumn,
double[][] destination)
Copy a submatrix.
|
DiagonalMatrix |
createMatrix(int rowDimension,
int columnDimension)
Create a new RealMatrix of the same type as the instance with the
supplied
row and column dimensions.
|
boolean |
equals(Object object)
Returns true iff
object is a RealMatrix instance with the same dimensions as this
and all corresponding matrix entries are equal. |
int |
getColumnDimension()
Returns the number of columns of this matrix.
|
RealMatrix |
getColumnMatrix(int column)
Get the entries at the given column index as a column matrix.
|
double[][] |
getData()
Returns matrix entries as a two-dimensional array.
|
double[] |
getDataRef()
Gets a reference to the underlying data array.
|
double |
getEntry(int row,
int column)
Get the entry in the specified row and column.
|
double |
getFrobeniusNorm()
Returns the
Frobenius norm of the matrix.
|
DiagonalMatrix |
getInverse()
Optimized method for
DiagonalMatrix matrix. |
DiagonalMatrix |
getInverse(Decomposition decomposition)
Optimized method for
DiagonalMatrix matrix. |
double |
getNorm()
Returns the
maximum absolute row sum norm of the matrix.
|
int |
getRowDimension()
Returns the number of rows of this matrix.
|
RealMatrix |
getRowMatrix(int row)
Get the entries at the given row index as a row matrix.
|
RealMatrix |
getSubMatrix(int[] selectedRows,
int[] selectedColumns)
Gets a submatrix.
|
RealMatrix |
getSubMatrix(int startRow,
int endRow,
int startColumn,
int endColumn)
Gets a submatrix.
|
int |
hashCode()
Computes a hashcode for the diagonal matrix.
|
boolean |
isAntisymmetric(double zeroDiagonalThreshold)
Checks if this is a antisymmetric matrix
|
boolean |
isDiagonal(double threshold)
Given a threshold, is this a diagonal matrix?
|
boolean |
isInvertible(double threshold)
Given a threshold, is this an invertible matrix?
|
boolean |
isOrthogonal(double thresholdNorm,
double thresholdOrthogonality)
Given a threshold, is this an orthogonal matrix?
|
boolean |
isSingular()
Returns whether this diagonal matrix is singular, i.e. any diagonal entry is equal to
0 within the
Precision.DOUBLE_COMPARISON_EPSILON threshold. |
boolean |
isSquare()
Is this a square matrix?
|
boolean |
isSymmetric()
Checks if this is a symmetric matrix
|
boolean |
isSymmetric(double relativeSymmetryThreshold)
Checks if this is a symmetric matrix
|
DiagonalMatrix |
multiply(DiagonalMatrix m)
Returns the result of postmultiplying this × m.
|
DiagonalMatrix |
multiply(DiagonalMatrix m,
boolean toTranspose)
Returns the result of postmultiplying this × m (independently from the
toTranspose
parameter value as we use diagonal matrix). |
DiagonalMatrix |
multiply(DiagonalMatrix m,
boolean toTranspose,
double d)
Returns the result of postmultiplying d × this × m (independently from the
toTranspose parameter value as we use diagonal matrix). |
RealMatrix |
multiply(RealMatrix m)
Returns the result of postmultiplying
this by m. |
RealMatrix |
multiply(RealMatrix m,
boolean toTranspose)
Returns the result of postmultiplying this × m (if
isTranspose = false)
or this × mT (if isTranspose = true) |
RealMatrix |
multiply(RealMatrix m,
boolean toTranspose,
double d)
Returns the result of postmultiplying d × this × m (if
toTranspose = false
) or d × this × mT (if toTranspose = true) |
void |
multiplyEntry(int row,
int column,
double factor)
Multiplies (in place) the specified entry of
this matrix by the
specified value. |
double[] |
operate(double[] v)
Returns the result of multiplying this by the vector
v. |
DiagonalMatrix |
permutation(int[] index)
Permute the rows/columns of this matrix according to a new specified index order list.
|
DiagonalMatrix |
power(int p)
Returns the result of multiplying
this with itself p times. |
double[] |
preMultiply(double[] v)
Returns the (row) vector result of premultiplying this by the vector
v. |
RealVector |
preMultiply(RealVector v)
Returns the (row) vector result of premultiplying this by the vector
v. |
SymmetricMatrix |
quadraticMultiplication(RealMatrix m)
Gets the result of the quadratic multiplication M×S×MT, where S is
this matrix and M is the provided matrix.
|
SymmetricMatrix |
quadraticMultiplication(RealMatrix m,
boolean isTranspose)
Gets the result of the quadratic multiplication M×S×MT, where S is
this matrix and M or MT is the provided matrix.
|
SymmetricMatrix |
scalarAdd(double d)
Returns the result of adding
d to each entry of this. |
DiagonalMatrix |
scalarMultiply(double d)
Returns the result of multiplying each entry of
this by d. |
void |
setEntry(int row,
int column,
double value)
Set the entry in the specified row and column.
|
void |
setSubMatrix(double[][] subMatrix,
int row,
int column)
The method systematically throws a
MathUnsupportedOperationException as this operation is not safe when
we deal with a DiagonalMatrix. |
DiagonalMatrix |
subtract(DiagonalMatrix m)
Returns
this minus m. |
RealMatrix |
subtract(RealMatrix m)
Returns
this minus m. |
SymmetricMatrix |
subtract(SymmetricMatrix m)
Subtracts a
SymmetricMatrix from this matrix. |
DiagonalMatrix |
transpose()
Returns the transpose of this matrix.
|
double |
walkInColumnOrder(RealMatrixChangingVisitor visitor)
Visit (and possibly change) all matrix entries in column order.
|
double |
walkInColumnOrder(RealMatrixChangingVisitor visitor,
int startRow,
int endRow,
int startColumn,
int endColumn)
Visit (and possibly change) some matrix entries in column order.
|
double |
walkInColumnOrder(RealMatrixPreservingVisitor visitor)
Visit (but don't change) all matrix entries in column order.
|
double |
walkInColumnOrder(RealMatrixPreservingVisitor visitor,
int startRow,
int endRow,
int startColumn,
int endColumn)
Visit (but don't change) some matrix entries in column order.
|
double |
walkInRowOrder(RealMatrixChangingVisitor visitor)
Visit (and possibly change) all matrix entries in row order.
|
double |
walkInRowOrder(RealMatrixChangingVisitor visitor,
int startRow,
int endRow,
int startColumn,
int endColumn)
Visit (and possibly change) some matrix entries in row order.
|
double |
walkInRowOrder(RealMatrixPreservingVisitor visitor)
Visit (but don't change) all matrix entries in row order.
|
double |
walkInRowOrder(RealMatrixPreservingVisitor visitor,
int startRow,
int endRow,
int startColumn,
int endColumn)
Visit (but don't change) some matrix entries in row order.
|
concatenateDiagonally, concatenateHorizontally, concatenateVertically, equals, getColumn, getColumnVector, getDefaultDecomposition, getRow, getRowVector, getTrace, isSymmetric, operate, preMultiply, setColumn, setColumnMatrix, setColumnVector, setDefaultDecomposition, setRow, setRowMatrix, setRowVector, toString, toString, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrderisTransposable, operateTransposeclone, finalize, getClass, notify, notifyAll, wait, wait, waitconcatenateDiagonally, concatenateHorizontally, concatenateVertically, equals, getColumn, getColumnVector, getDefaultDecomposition, getRow, getRowVector, getTrace, isSymmetric, operate, preMultiply, setColumn, setColumnMatrix, setColumnVector, setDefaultDecomposition, setRow, setRowMatrix, setRowVector, toString, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrderpublic DiagonalMatrix(int dimension)
dimension - Number of rows and columns in the new matrix.NotStrictlyPositiveException - if the dimension is
not positive.public DiagonalMatrix(double[] d)
d - Data for the new matrix.NullArgumentException - if d is null.public DiagonalMatrix(double[] d,
boolean copyArray)
copyArray may be
set to false.
This will prevent the copying and improve performance as no new
array will be built and no data will be copied.d - Data for new matrix.copyArray - if true, the input array will be copied,
otherwise it will be referenced.NullArgumentException - if d is null.public DiagonalMatrix createMatrix(int rowDimension, int columnDimension)
createMatrix in interface RealMatrixcreateMatrix in class AbstractRealMatrixrowDimension - the number of rows in the new matrixcolumnDimension - the number of columns in the new matrixDimensionMismatchException - if the requested dimensions are not equal.public RealMatrix add(RealMatrix m)
this and m.add in interface RealMatrixadd in class AbstractRealMatrixm - matrix to be addedthis + mpublic SymmetricMatrix add(SymmetricMatrix m)
SymmetricMatrix to this matrix.add in interface SymmetricMatrixm - the matrix to addpublic DiagonalMatrix add(DiagonalMatrix m)
this and m.m - Matrix to be added.this + m.MatrixDimensionMismatchException - if m is not the same
size as this.public RealMatrix subtract(RealMatrix m)
this minus m.subtract in interface RealMatrixsubtract in class AbstractRealMatrixm - matrix to be subtractedthis - mpublic SymmetricMatrix subtract(SymmetricMatrix m)
SymmetricMatrix from this matrix.subtract in interface SymmetricMatrixm - the matrix to subtractpublic DiagonalMatrix subtract(DiagonalMatrix m)
this minus m.m - Matrix to be subtracted.this - mMatrixDimensionMismatchException - if m is not the same
size as this.public SymmetricMatrix scalarAdd(double d)
d to each entry of this.
Returns a ArrayRowSymmetricMatrix since the matrix is symmetric.
scalarAdd in interface RealMatrixscalarAdd in interface SymmetricMatrixscalarAdd in class AbstractRealMatrixd - value to be added to each entryd + thispublic RealMatrix multiply(RealMatrix m)
this by m.multiply in interface RealMatrixmultiply in class AbstractRealMatrixm - matrix to postmultiply bythis * mpublic RealMatrix multiply(RealMatrix m, boolean toTranspose)
isTranspose = false)
or this × mT (if isTranspose = true)multiply in interface RealMatrixmultiply in class AbstractRealMatrixm - matrix to postmultiply bytoTranspose - if true, assumes the provided matrix is MT, otherwise assumes it is Mpublic RealMatrix multiply(RealMatrix m, boolean toTranspose, double d)
toTranspose = false
) or d × this × mT (if toTranspose = true)multiply in interface RealMatrixmultiply in class AbstractRealMatrixm - matrix to postmultiply bytoTranspose - indication value, true if we expect the m matrix to be transposedd - value to multiply all entries bypublic DiagonalMatrix multiply(DiagonalMatrix m)
m - matrix to postmultiply bythis * mDimensionMismatchException - if matrices are not multiplication compatiblepublic DiagonalMatrix multiply(DiagonalMatrix m, boolean toTranspose)
toTranspose
parameter value as we use diagonal matrix).
Optimized method for diagonal matrix.m - matrix to postmultiply bytoTranspose - no used value for diagonal matrixthis * m or @return this * m.transposedDimensionMismatchException - if matrices are not multiplication compatiblepublic DiagonalMatrix multiply(DiagonalMatrix m, boolean toTranspose, double d)
toTranspose parameter value as we use diagonal matrix).
Optimized method for diagonal matrix.multiply in class AbstractRealMatrixm - matrix to postmultiply bytoTranspose - no used value for diagonal matrixd - value to multiply all entries byDimensionMismatchException - if matrices are not multiplication compatiblepublic DiagonalMatrix scalarMultiply(double d)
this by d.scalarMultiply in interface RealMatrixscalarMultiply in interface SymmetricMatrixscalarMultiply in class AbstractRealMatrixd - value to multiply all entries byd * thispublic DiagonalMatrix getInverse()
DiagonalMatrix matrix.getInverse in interface RealMatrixgetInverse in interface SymmetricMatrixgetInverse in class AbstractRealMatrixSingularMatrixException - if the decomposed matrix is singular.public DiagonalMatrix getInverse(Decomposition decomposition)
DiagonalMatrix matrix.
The input Decomposition isn't used.getInverse in interface RealMatrixgetInverse in interface SymmetricMatrixgetInverse in class AbstractRealMatrixdecomposition - decomposed matrixSingularMatrixException - if the decomposed matrix is singular.public boolean isSingular()
0 within the
Precision.DOUBLE_COMPARISON_EPSILON threshold.true if the matrix is singular, false otherwisepublic boolean isOrthogonal(double thresholdNorm,
double thresholdOrthogonality)
isOrthogonal in interface RealMatrixisOrthogonal in class AbstractRealMatrixthresholdNorm - : allowed relative error with respect to the normality of
the vectorsthresholdOrthogonality - : allowed absolute error with respect to the mutual
orthogonality of the vectorspublic boolean isDiagonal(double threshold)
isDiagonal in interface RealMatrixisDiagonal in class AbstractRealMatrixthreshold - : allowed absolute error on non diagonal elementspublic boolean isSquare()
isSquare in interface AnyMatrixisSquare in class AbstractRealMatrixpublic boolean isSymmetric()
Matrix is considered symmetric if no cross-term violates default absolute and relative thresholds (
both Precision.DOUBLE_COMPARISON_EPSILON).
isSymmetric in interface RealMatrixisSymmetric in class AbstractRealMatrixpublic boolean isSymmetric(double relativeSymmetryThreshold)
Matrix is considered symmetric if no cross-term violates provided relative threshold and 0 absolute threshold.
isSymmetric in interface RealMatrixisSymmetric in class AbstractRealMatrixrelativeSymmetryThreshold - relative threshold above which off-diagonal
elements are considered too different and matrix not symmetricpublic boolean isAntisymmetric(double zeroDiagonalThreshold)
isAntisymmetric in interface RealMatrixisAntisymmetric in class AbstractRealMatrixzeroDiagonalThreshold - the threshold used in
comparisons to zero for the diagonal valuespublic DiagonalMatrix transpose()
transpose in interface RealMatrixtranspose in interface SymmetricMatrixtranspose in class AbstractRealMatrixpublic boolean isInvertible(double threshold)
isInvertible in interface RealMatrixisInvertible in class AbstractRealMatrixthreshold - : allowed relative error on the column vectors independencepublic double[][] getData()
getData in interface RealMatrixgetData in class AbstractRealMatrixpublic double[] getDataRef()
public void setSubMatrix(double[][] subMatrix,
int row,
int column)
MathUnsupportedOperationException as this operation is not safe when
we deal with a DiagonalMatrix.setSubMatrix in interface RealMatrixsetSubMatrix in class AbstractRealMatrixsubMatrix - array containing the submatrix replacement datarow - row coordinate of the top, left element to be replacedcolumn - column coordinate of the top, left element to be replacedMathUnsupportedOperationException - systematically, since this operation is not supportedpublic double getEntry(int row,
int column)
getEntry in interface RealMatrixgetEntry in class AbstractRealMatrixrow - Row index of entry to be fetched.column - Column index of entry to be fetched.(row, column).public void setEntry(int row,
int column,
double value)
setEntry in interface RealMatrixsetEntry in class AbstractRealMatrixrow - Row index of entry to be set.column - Column index of entry to be set.value - the new value of the entry.MathUnsupportedOperationException - if row != column.public void addToEntry(int row,
int column,
double increment)
this matrix. Row and column indices start
at 0.addToEntry in interface RealMatrixaddToEntry in class AbstractRealMatrixrow - Row index of the entry to be modified.column - Column index of the entry to be modified.increment - value to add to the matrix entry.MathUnsupportedOperationException - if row != column.public void multiplyEntry(int row,
int column,
double factor)
this matrix by the
specified value. Row and column indices start at 0.multiplyEntry in interface RealMatrixmultiplyEntry in class AbstractRealMatrixrow - Row index of the entry to be modified.column - Column index of the entry to be modified.factor - Multiplication factor for the matrix entry.MathUnsupportedOperationException - if row != column.public DiagonalMatrix power(int p)
this with itself p times. Depending on the underlying storage,
instability for high powers
might occur.power in interface RealMatrixpower in interface SymmetricMatrixpower in class AbstractRealMatrixp - raise this to power pthis^ppublic int getRowDimension()
getRowDimension in interface AnyMatrixgetRowDimension in class AbstractRealMatrixpublic int getColumnDimension()
getColumnDimension in interface AnyMatrixgetColumnDimension in class AbstractRealMatrixpublic double[] operate(double[] v)
v.operate in interface RealMatrixoperate in class AbstractRealMatrixv - the vector to operate onthis * vpublic double[] preMultiply(double[] v)
v.preMultiply in interface RealMatrixpreMultiply in class AbstractRealMatrixv - the row vector to premultiply byv * thispublic RealVector preMultiply(RealVector v)
v.preMultiply in interface RealMatrixpreMultiply in class AbstractRealMatrixv - the row vector to premultiply byv * thispublic SymmetricMatrix quadraticMultiplication(RealMatrix m)
quadraticMultiplication in interface SymmetricMatrixm - the matrix Mpublic SymmetricMatrix quadraticMultiplication(RealMatrix m, boolean isTranspose)
quadraticMultiplication in interface SymmetricMatrixm - the matrix M or the matrix MTisTranspose - if true, assume the provided matrix is MT, otherwise assumes it is Mpublic DiagonalMatrix permutation(int[] index)
The index list must be the same dimension as the matrix and each index must be represented.
Usage example :
1 2 3 2 3 1
1 [lambda1, mu, gamma] 2 [lambda2, beta, mu]
2 [ mu, lambda2, beta] --> {2,3,1} --> 3 [ beta, lambda3, gamma]
3 [ gamma, beta, lambda3] 1 [ mu, gamma, lambda1]
permutation in interface SymmetricMatrixindex - Index list of the expected permutationpublic RealMatrix getRowMatrix(int row)
getRowMatrix in interface RealMatrixgetRowMatrix in class AbstractRealMatrixrow - Row to be fetched.public RealMatrix getColumnMatrix(int column)
getColumnMatrix in interface RealMatrixgetColumnMatrix in class AbstractRealMatrixcolumn - Column to be fetched.public void copySubMatrix(int startRow,
int endRow,
int startColumn,
int endColumn,
double[][] destination)
copySubMatrix in interface RealMatrixcopySubMatrix in class AbstractRealMatrixstartRow - Initial row indexendRow - Final row index (inclusive)startColumn - Initial column indexendColumn - Final column index (inclusive)destination - The arrays where the submatrix data should be copied
(if larger than rows/columns counts, only the upper-left part will be
used)public void copySubMatrix(int[] selectedRows,
int[] selectedColumns,
double[][] destination)
copySubMatrix in interface RealMatrixcopySubMatrix in class AbstractRealMatrixselectedRows - Array of row indices.selectedColumns - Array of column indices.destination - The arrays where the submatrix data should be copied
(if larger than rows/columns counts, only the upper-left part will be
used)public double walkInRowOrder(RealMatrixChangingVisitor visitor)
Row order starts at upper left and iterating through all elements of a row from left to right before going to the leftmost element of the next row.
walkInRowOrder in interface RealMatrixwalkInRowOrder in class AbstractRealMatrixvisitor - visitor used to process all matrix entriesRealMatrixChangingVisitor.end() at the end
of the walkRealMatrix.walkInRowOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor, int, int, int, int)public double walkInRowOrder(RealMatrixPreservingVisitor visitor)
Row order starts at upper left and iterating through all elements of a row from left to right before going to the leftmost element of the next row.
walkInRowOrder in interface RealMatrixwalkInRowOrder in class AbstractRealMatrixvisitor - visitor used to process all matrix entriesRealMatrixPreservingVisitor.end() at the end
of the walkRealMatrix.walkInRowOrder(RealMatrixChangingVisitor),
RealMatrix.walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor, int, int, int, int)public double walkInRowOrder(RealMatrixChangingVisitor visitor, int startRow, int endRow, int startColumn, int endColumn)
Row order starts at upper left and iterating through all elements of a row from left to right before going to the leftmost element of the next row.
walkInRowOrder in interface RealMatrixwalkInRowOrder in class AbstractRealMatrixvisitor - visitor used to process all matrix entriesstartRow - Initial row indexendRow - Final row index (inclusive)startColumn - Initial column indexendColumn - Final column indexRealMatrixChangingVisitor.end() at the end
of the walkRealMatrix.walkInRowOrder(RealMatrixChangingVisitor),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor, int, int, int, int)public double walkInRowOrder(RealMatrixPreservingVisitor visitor, int startRow, int endRow, int startColumn, int endColumn)
Row order starts at upper left and iterating through all elements of a row from left to right before going to the leftmost element of the next row.
walkInRowOrder in interface RealMatrixwalkInRowOrder in class AbstractRealMatrixvisitor - visitor used to process all matrix entriesstartRow - Initial row indexendRow - Final row index (inclusive)startColumn - Initial column indexendColumn - Final column indexRealMatrixPreservingVisitor.end() at the end
of the walkRealMatrix.walkInRowOrder(RealMatrixChangingVisitor),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor, int, int, int, int)public double walkInColumnOrder(RealMatrixChangingVisitor visitor)
Column order starts at upper left and iterating through all elements of a column from top to bottom before going to the topmost element of the next column.
walkInColumnOrder in interface RealMatrixwalkInColumnOrder in class AbstractRealMatrixvisitor - visitor used to process all matrix entriesRealMatrixChangingVisitor.end() at the end
of the walkRealMatrix.walkInRowOrder(RealMatrixChangingVisitor),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor, int, int, int, int)public double walkInColumnOrder(RealMatrixPreservingVisitor visitor)
Column order starts at upper left and iterating through all elements of a column from top to bottom before going to the topmost element of the next column.
walkInColumnOrder in interface RealMatrixwalkInColumnOrder in class AbstractRealMatrixvisitor - visitor used to process all matrix entriesRealMatrixPreservingVisitor.end() at the end
of the walkRealMatrix.walkInRowOrder(RealMatrixChangingVisitor),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor, int, int, int, int)public double walkInColumnOrder(RealMatrixChangingVisitor visitor, int startRow, int endRow, int startColumn, int endColumn)
Column order starts at upper left and iterating through all elements of a column from top to bottom before going to the topmost element of the next column.
walkInColumnOrder in interface RealMatrixwalkInColumnOrder in class AbstractRealMatrixvisitor - visitor used to process all matrix entriesstartRow - Initial row indexendRow - Final row index (inclusive)startColumn - Initial column indexendColumn - Final column indexRealMatrixChangingVisitor.end() at the end
of the walkRealMatrix.walkInRowOrder(RealMatrixChangingVisitor),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor, int, int, int, int)public double walkInColumnOrder(RealMatrixPreservingVisitor visitor, int startRow, int endRow, int startColumn, int endColumn)
Column order starts at upper left and iterating through all elements of a column from top to bottom before going to the topmost element of the next column.
walkInColumnOrder in interface RealMatrixwalkInColumnOrder in class AbstractRealMatrixvisitor - visitor used to process all matrix entriesstartRow - Initial row indexendRow - Final row index (inclusive)startColumn - Initial column indexendColumn - Final column indexRealMatrixPreservingVisitor.end() at the end
of the walkRealMatrix.walkInRowOrder(RealMatrixChangingVisitor),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor, int, int, int, int)public DiagonalMatrix copy()
copy in interface RealMatrixcopy in interface SymmetricMatrixcopy in class AbstractRealMatrixpublic double getNorm()
getNorm in interface RealMatrixgetNorm in class AbstractRealMatrixpublic double getFrobeniusNorm()
getFrobeniusNorm in interface RealMatrixgetFrobeniusNorm in class AbstractRealMatrixpublic RealMatrix getSubMatrix(int startRow, int endRow, int startColumn, int endColumn)
Note that if the selected rows and columns are not the same, the returned matrix will be a regular matrix.
getSubMatrix in interface RealMatrixgetSubMatrix in class AbstractRealMatrixstartRow - Initial row indexendRow - Final row index (inclusive)startColumn - Initial column indexendColumn - Final column index (inclusive)public RealMatrix getSubMatrix(int[] selectedRows, int[] selectedColumns)
Note that if the selected rows and columns are not the same, the returned matrix will be a regular matrix.
getSubMatrix in interface RealMatrixgetSubMatrix in class AbstractRealMatrixselectedRows - Array of row indices.selectedColumns - Array of column indices.public boolean equals(Object object)
object is a RealMatrix instance with the same dimensions as this
and all corresponding matrix entries are equal.equals in class AbstractRealMatrixobject - the object to test equality against.public int hashCode()
hashCode in class AbstractRealMatrixCopyright © 2021 CNES. All rights reserved.