

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: INNER  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object  +numericalMethods.algebra.linear.decompose.LR
Computes for a square matrix A the matrices L and R complying A=L·R. The algorithm used is the Gauss algorithm.
If a zero happens to be on the diagonal while computing, this method
doesn't work.
So if the method is not successful that does not mean this
matrix is singular.
For a method having not this problem see PLR
.
This algorithm is implemented for both real and complex valued equation systems. And each method is again available in two version.
One version is an optimized version that consumes as few resources as possible.
The other version is an easy to use version that takes care of for example not changing any arguments where not expected. But this version can sometimes be very resource consuming!
Method versions for A=L·R:
This class does not check any arguments for validity!
optimized easy to use real valued decompose(A)
decompose(A,L,R)
complex valued decompose(A)
decompose(A,L,R)
PLR
,
numericalMethods.algebra.linear.decomposeConstructor Summary  
LR()

Method Summary  
static double 
decompose(double[][] A)
Decomposes a real matrix. 
static double[] 
decompose(double[][] A_re,
double[][] A_im)
Decomposes a complex matrix. 
static double 
decompose(double[][] A,
double[][] L,
double[][] R)
Decomposes a real matrix. 
static double[] 
decompose(double[][] A_re,
double[][] A_im,
double[][] L_re,
double[][] L_im,
double[][] R_re,
double[][] R_im)
Decomposes a complex matrix. 
Methods inherited from class java.lang.Object 

Constructor Detail 
public LR()
Method Detail 
public static double decompose(double[][] A)
The left and right triangular matrices are stored merged into
the original matrix.
The diagonal belongs to the right triangular matrix because the diagonal
elements of the left triangular matrix are per definition equal to one.
For unmerging them see
Unmerge.triangular
.
A
 The matrix to decompose and afterwards the merged left and
right triangular matrix.PLR
,
Unmerge.triangular
public static double decompose(double[][] A, double[][] L, double[][] R)
A
 The matrix to decompose.L
 A matrix taking the left triangular matrix.R
 A matrix taking the right triangular matrix.PLR
public static double[] decompose(double[][] A_re, double[][] A_im)
The left and right triangular matrices are stored merged into the
original matrix.
The diagonal belongs to the right triangular matrix because the diagonal
elements of the left triangular matrix are per definition equal to one.
For unmerging them see
Unmerge.triangular
.
A_re
 The real part of the matrix to decompose and afterwards
the real parts of the merged left and right triangular
matrix.A_im
 The imaginary part of the matrix to decompose and
afterwards the imaginary parts of the merged left and
right triangular matrix.PLR
,
Unmerge.triangular
public static double[] decompose(double[][] A_re, double[][] A_im, double[][] L_re, double[][] L_im, double[][] R_re, double[][] R_im)
A_re
 The real part of the matrix to decompose.A_im
 The imaginary part of the matrix to decompose.L_re
 A matrix taking the real part of the left triangular
matrix.L_im
 A matrix taking the imaginary part of the left
triangular matrix.R_re
 A matrix taking the real part of the right triangular
matrix.R_im
 A matrix taking the imaginary part of the right
triangular matrix.PLR


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: INNER  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 