ch.javasoft.smx.ops
Interface ExtendedMatrixOperations<N extends Number,I extends Number>

Type Parameters:
N - the input number type
I - the output number type for inverted numbers
All Known Implementing Classes:
BigIntegerMatrixOperations, BigIntegerRationalMatrixOperations, ExtendedDoubleOperations, ExtendedIntDoubleOperations, ExtendedLongDoubleOperations, IntMatrixOperations, LongMatrixOperations

public 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

rank

int rank(ReadableMatrix<N> mx)
Returns the rank of the given matrix.

Usually, Gaussian elimination is used to compute the rank


nullity

int nullity(ReadableMatrix<N> mx)
Returns the nullity of the given matrix, that is, the dimension of the nullspace of mx. Note that by the rank-nullity theorem,
   rank(mx) + nullity(mx) = n
 
where n is the number of columns of mx.

Usually, Gaussian elimination is used to compute the nullity.


invert

ReadableMatrix<I> invert(ReadableMatrix<N> mx)
Returns the matrix inverse of a square matrix mx, that is, a matrix res = null(mx), such that
   mx * res = I
 
where I is the identity matrix.

Usually, Gaussian elimination is used to compute the inverse matrix.


nullspace

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:
   span(res) = null(mx) = { x : mx * x = 0}
 

Usually, Gaussian elimination is used to compute the kernel matrix.