SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.matrix.doubles.factorization.gaussianelimination
Class GaussianElimination4SquareMatrix

java.lang.Object
  extended by com.numericalmethod.suanshu.matrix.doubles.factorization.gaussianelimination.GaussianElimination4SquareMatrix
All Implemented Interfaces:
LUDecomposition

public class GaussianElimination4SquareMatrix
extends java.lang.Object
implements LUDecomposition

This class is a wrapper for GaussianElimination but applies only to square matrices.


Constructor Summary
GaussianElimination4SquareMatrix(Matrix A)
          Construct an instance of GaussianElimination4SquareMatrix for a square matrix.
GaussianElimination4SquareMatrix(Matrix A, double epsilon)
          Construct an instance of GaussianElimination4SquareMatrix for a square matrix.
 
Method Summary
 LowerTriangularMatrix L()
          Get a copy of the lower triangular matrix L as in P %*% A == L %*% U
 PermutationMatrix P()
          Get a copy of the permutation matrix P as in P %*% A == L %*% U
 UpperTriangularMatrix U()
          Get a copy of the upper triangular matrix U as in P %*% A == L %*% U
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GaussianElimination4SquareMatrix

public GaussianElimination4SquareMatrix(Matrix A,
                                        double epsilon)
Construct an instance of GaussianElimination4SquareMatrix for a square matrix.

Parameters:
A - a square matrix
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
Throws:
java.lang.IllegalArgumentException - if A is not square

GaussianElimination4SquareMatrix

public GaussianElimination4SquareMatrix(Matrix A)
Construct an instance of GaussianElimination4SquareMatrix for a square matrix.

Parameters:
A - a square matrix
Throws:
java.lang.IllegalArgumentException - if A is not square
Method Detail

L

public LowerTriangularMatrix L()
Description copied from interface: LUDecomposition
Get a copy of the lower triangular matrix L as in
P %*% A == L %*% U

Specified by:
L in interface LUDecomposition
Returns:
a copy of L

U

public UpperTriangularMatrix U()
Description copied from interface: LUDecomposition
Get a copy of the upper triangular matrix U as in
P %*% A == L %*% U

Specified by:
U in interface LUDecomposition
Returns:
a copy of U

P

public PermutationMatrix P()
Description copied from interface: LUDecomposition
Get a copy of the permutation matrix P as in
P %*% A == L %*% U

Specified by:
P in interface LUDecomposition
Returns:
a copy of P

SuanShu, a Java numerical and statistical library

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