SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.matrix.doubles.operation
Class Inverse

java.lang.Object
  extended by com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixMathImpl<T>
      extended by com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixStorageImpl<DenseMatrix>
          extended by com.numericalmethod.suanshu.matrix.doubles.matrixtype.dense.DenseMatrix
              extended by com.numericalmethod.suanshu.matrix.doubles.operation.Inverse
All Implemented Interfaces:
DeepCopyable, AbelianGroup<Matrix>, Monoid<Matrix>, Ring<Matrix>, Matrix, MatrixAccessor, MatrixRing, Densifiable, MatrixDimension

public class Inverse
extends DenseMatrix

For a square matrix A,

A-1
, if the inverse exists. This equality holds true:
A.multiply(A.inverse()) == A.ONE()

There are multiple ways to compute the inverse of A. They are,

See Also:
Wikipedia: Invertible matrix

Field Summary
 int dim
          dimension of the square matrix
 double epsilon
          a precision parameter: when a number |x| ≤ ε, it is considered 0
 
Constructor Summary
Inverse(LowerTriangularMatrix L, double epsilon)
          Invert a lower triangular matrix.
Inverse(Matrix A)
          Construct a DenseMatrix that is the inverse of a DenseMatrix A.
Inverse(Matrix A, double epsilon)
          Construct a DenseMatrix that is the inverse of a DenseMatrix A.
Inverse(UpperTriangularMatrix U, double epsilon)
          Invert an upper triangular matrix.
 
Method Summary
 
Methods inherited from class com.numericalmethod.suanshu.matrix.doubles.matrixtype.dense.DenseMatrix
add, deepCopy, getColumn, getColumn, getMatrixData, getRow, getRow, getSample, minus, multiply, multiply, ONE, overwrite, scaled, t, toDense, ZERO
 
Methods inherited from class com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixStorageImpl
equals, get, hashCode, set, setMatrixData
 
Methods inherited from class com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixMathImpl
add, call, minus, multiply, nCols, nRows, opposite, setColumn, setColumn, setRow, setRow, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

dim

public final int dim
dimension of the square matrix


epsilon

public final double epsilon
a precision parameter: when a number |x| ≤ ε, it is considered 0

Constructor Detail

Inverse

public Inverse(Matrix A,
               double epsilon)
Construct a DenseMatrix that is the inverse of a DenseMatrix A.

Parameters:
A - a DenseMatrix
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0

Inverse

public Inverse(Matrix A)
Construct a DenseMatrix that is the inverse of a DenseMatrix A.

Parameters:
A - a DenseMatrix

Inverse

public Inverse(UpperTriangularMatrix U,
               double epsilon)
Invert an upper triangular matrix.

Parameters:
U - an upper triangular matrix
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
See Also:
"Algorithm 1.10. Matrix Algorithms, Vol 1. Basic Decompositions. G. W. Stewart."

Inverse

public Inverse(LowerTriangularMatrix L,
               double epsilon)
Invert a lower triangular matrix.

Parameters:
L - a lower triangular matrix
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
See Also:
"Algorithm 2.3. Matrix Algorithms, Vol 1. Basic Decompositions. G. W. Stewart."

SuanShu, a Java numerical and statistical library

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