numericalMethods.algebra.linear.solve
Class LXB

java.lang.Object
  |
  +--numericalMethods.algebra.linear.solve.LXB

public class LXB
extends java.lang.Object

Computes for a system of equations LX=B with given left triangular matrix L and matrix B the solving matrix X.

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 Lx=b:

optimizedeasy to use
real valued solve(L,b) solve(L,x,b)
complex valued solve(L,b) solve(L,x,b)
Method versions for LX=B:
optimizedeasy to use
real valued solve(L,B) solve(L,X,B)
complex valued solve(L,B) solve(L,X,B)
This class does not check any arguments for validity!
For identical arguments results are undefined!


Constructor Summary
LXB()
           
 
Method Summary
static boolean solve(double[][] L, double[] b)
          Solves a system of real equations.
static boolean solve(double[][] L, double[][] B)
          Solves a system of real equations.
static boolean solve(double[][] L, double[][] X, double[][] B)
          Solves a system of real equations.
static boolean solve(double[][] L_re, double[][] L_im, double[][] B_re, double[][] B_im)
          Solves a system of complex equations.
static boolean solve(double[][] L_re, double[][] L_im, double[][] X_re, double[][] X_im, double[][] B_re, double[][] B_im)
          Solves a system of complex equations.
static boolean solve(double[][] L_re, double[][] L_im, double[] b_re, double[] b_im)
          Solves a system of complex equations.
static boolean solve(double[][] L_re, double[][] L_im, double[] x_re, double[] x_im, double[] b_re, double[] b_im)
          Solves a system of complex equations.
static boolean solve(double[][] L, double[] x, double[] b)
          Solves a system of real equations.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LXB

public LXB()
Method Detail

solve

public static boolean solve(double[][] L,
                            double[] b)
Solves a system of real equations.

Parameters:
L - The left triangular matrix.
b - The right side and the solution afterwards (for non square left sides the lower part is ignored).
Returns:
True if system was solvable.

solve

public static boolean solve(double[][] L,
                            double[] x,
                            double[] b)
Solves a system of real equations.

Parameters:
L - The left triangular matrix.
x - A vector taking the solution.
b - The right side (for non square left sides the lower part is ignored).
Returns:
True if system was solvable.

solve

public static boolean solve(double[][] L_re,
                            double[][] L_im,
                            double[] b_re,
                            double[] b_im)
Solves a system of complex equations.

Parameters:
L_re - The real part of the left triangular matrix.
L_im - The imaginary part of the left triangular matrix.
b_re - The real part of the right side and the solution afterwards (for non square left sides the lower part is ignored).
b_im - The imaginary part of the right side and the solution afterwards (for non square left sides the lower part is ignored).
Returns:
True if system was solvable.

solve

public static boolean solve(double[][] L_re,
                            double[][] L_im,
                            double[] x_re,
                            double[] x_im,
                            double[] b_re,
                            double[] b_im)
Solves a system of complex equations.

Parameters:
L_re - The real part of the left triangular matrix.
L_im - The imaginary part of the left triangular matrix.
x_re - A vector taking the real part of the solution.
x_im - A vector taking the imaginary part of the solution.
b_re - The real part of the right side (for non square left sides the lower part is ignored).
b_im - The imaginary part of the right side (for non square left sides the lower part is ignored).
Returns:
True if system was solvable.

solve

public static boolean solve(double[][] L,
                            double[][] B)
Solves a system of real equations.

Parameters:
L - The left triangular matrix.
B - The right side and the solution afterwards (for non square left sides the lower part is ignored).
Returns:
True if system was solvable.

solve

public static boolean solve(double[][] L,
                            double[][] X,
                            double[][] B)
Solves a system of real equations.

Parameters:
L - The left triangular matrix.
X - A matrix taking the solution.
B - The right side (for non square left sides the lower part is ignored).
Returns:
True if system was solvable.

solve

public static boolean solve(double[][] L_re,
                            double[][] L_im,
                            double[][] B_re,
                            double[][] B_im)
Solves a system of complex equations.

Parameters:
L_re - The real part of the left triangular matrix.
L_im - The imaginary part of the left triangular matrix.
B_re - The real part of the right side and the solution afterwards (for non square left sides the lower part is ignored).
B_im - The imaginary part of the right side and the solution afterwards (for non square left sides the lower part is ignored).
Returns:
True if system was solvable.

solve

public static boolean solve(double[][] L_re,
                            double[][] L_im,
                            double[][] X_re,
                            double[][] X_im,
                            double[][] B_re,
                            double[][] B_im)
Solves a system of complex equations.

Parameters:
L_re - The real part of the left triangular matrix.
L_im - The imaginary part of the left triangular matrix.
X_re - A matrix taking the real part of the solution.
X_im - A matrix taking the imaginary part of the solution.
B_re - The real part of the right side (for non square left sides the lower part is ignored).
B_im - The imaginary part of the right side (for non square left sides the lower part is ignored).
Returns:
True if system was solvable.