|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
N - the input number typeI - the output number type for inverted numberspublic interface ExtendedMatrixOperations<N extends Number,I extends Number>
Extended matrix operations adds more complex operations for matrices, such as inversion or nullspace computation, where the result matrix is not necessarily of the same number type as the input matrix. Other operations are related to such operations, and for some number types, one might have to define a precision (tolerance) to perform the operations.
Usually, the result type involves inversion of numbers. For instance, for an interger matrix, its inverse may be a fraction number matrix.
| Method Summary | |
|---|---|
ReadableMatrix<I> |
invert(ReadableMatrix<N> mx)
Returns the matrix inverse of a square matrix mx, that is, a matrix res = null(mx), such that |
int |
nullity(ReadableMatrix<N> mx)
Returns the nullity of the given matrix, that is, the dimension of the nullspace of mx. |
ReadableMatrix<I> |
nullspace(ReadableMatrix<N> mx)
Returns a basis for the kernel (or nullspace) of mx, that is, a matrix res, such that it spans the nullspace: |
int |
rank(ReadableMatrix<N> mx)
Returns the rank of the given matrix. |
| Method Detail |
|---|
int rank(ReadableMatrix<N> mx)
Usually, Gaussian elimination is used to compute the rank
int nullity(ReadableMatrix<N> mx)
rank(mx) + nullity(mx) = nwhere n is the number of columns of mx.
Usually, Gaussian elimination is used to compute the nullity.
ReadableMatrix<I> invert(ReadableMatrix<N> mx)
mx * res = Iwhere I is the identity matrix.
Usually, Gaussian elimination is used to compute the inverse matrix.
ReadableMatrix<I> nullspace(ReadableMatrix<N> mx)
span(res) = null(mx) = { x : mx * x = 0}
Usually, Gaussian elimination is used to compute the kernel matrix.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||