SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.matrix.doubles
Interface MatrixRing

All Superinterfaces:
AbelianGroup<Matrix>, Monoid<Matrix>, Ring<Matrix>
All Known Subinterfaces:
Matrix, SparseMatrix
All Known Implementing Classes:
BidiagonalMatrix, BorderedHessian, CovarianceMatrix, CsrSparseMatrix, DenseMatrix, DiagonalMatrix, DokSparseMatrix, GivensMatrix, GoldfeldQuandtTrotter, Gradient, Hessian, HilbertMatrix, ImmutableKroneckerProduct, ImmutableMatrix, Inverse, Jacobian, JordanExchange, KroneckerProduct, LilSparseMatrix, LowerTriangularMatrix, MatrixMathImpl, MatrixStorageImpl, MatthewsDavies, PermutationMatrix, Pow, PseudoInverse, SubMatrixRef, SymmetricMatrix, TriangularMatrix, TridiagonalMatrix, UpperTriangularMatrix

public interface MatrixRing
extends Ring<Matrix>

A matrix ring is the set of all n×n matrices over an arbitrary Ring R. This matrix set becomes a ring under matrix addition and multiplication. Moreover, it has a structure of a *-algebra over R, where the involution * on the matrix ring is the matrix transposition.


Method Summary
 Matrix add(Matrix that)
          this + that
 Matrix minus(Matrix that)
          this - that
 Matrix multiply(Matrix that)
          this %*% that
 Matrix ONE()
          Get an identity matrix that has the same dimension as this matrix.
 Matrix opposite()
          Get the opposite of this matrix.
 Matrix t()
          t(this) Compute the transpose of this matrix.
 Matrix ZERO()
          Get a zero matrix that has the same dimension as this matrix.
 

Method Detail

add

Matrix add(Matrix that)
this + that

Specified by:
add in interface AbelianGroup<Matrix>
Parameters:
that - another matrix
Returns:
the sum of this and that

minus

Matrix minus(Matrix that)
this - that

Specified by:
minus in interface AbelianGroup<Matrix>
Parameters:
that - another matrix
Returns:
the difference between this and that

multiply

Matrix multiply(Matrix that)
this %*% that

Specified by:
multiply in interface Monoid<Matrix>
Parameters:
that - another matrix
Returns:
the product of this and that

opposite

Matrix opposite()
Get the opposite of this matrix.

Specified by:
opposite in interface AbelianGroup<Matrix>
Returns:
-this
See Also:
Wikipedia: Additive inverse

ZERO

Matrix ZERO()
Get a zero matrix that has the same dimension as this matrix.

Specified by:
ZERO in interface AbelianGroup<Matrix>
Returns:
the 0 matrix

ONE

Matrix ONE()
Get an identity matrix that has the same dimension as this matrix.

For a non-square matrix, it zeros out the rows (columns) with index > nCols (nRows).

Specified by:
ONE in interface Monoid<Matrix>
Returns:
an identity matrix

t

Matrix t()
t(this)

Compute the transpose of this matrix. The original matrix does not change. The returned value is independent and can be modified anyhow.

This is the involution on the matrix ring.

Returns:
the transpose of this matrix, of the same type

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.