numericalMethods.algebra.linear.solve
Class RXB

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

public class RXB
extends java.lang.Object

Computes for a system of equations RX=B with given right triangular matrix R 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 Rx=b:

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


Constructor Summary
RXB()
           
 
Method Summary
static boolean solve(double[][] R, double[] b)
          Solves a system of real equations.
static boolean solve(double[][] R, double[][] B)
          Solves a system of real equations.
static boolean solve(double[][] R, double[][] X, double[][] B)
          Solves a system of real equations.
static boolean solve(double[][] R_re, double[][] R_im, double[][] B_re, double[][] B_im)
          Solves a system of complex equations.
static boolean solve(double[][] R_re, double[][] R_im, double[][] X_re, double[][] X_im, double[][] B_re, double[][] B_im)
          Solves a system of complex equations.
static boolean solve(double[][] R_re, double[][] R_im, double[] b_re, double[] b_im)
          Solves a system of complex equations.
static boolean solve(double[][] R_re, double[][] R_im, double[] x_re, double[] x_im, double[] b_re, double[] b_im)
          Solves a system of complex equations.
static boolean solve(double[][] R, 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

RXB

public RXB()
Method Detail

solve

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

Parameters:
R - The right 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[][] R,
                            double[] x,
                            double[] b)
Solves a system of real equations.

Parameters:
R - The right 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[][] R_re,
                            double[][] R_im,
                            double[] b_re,
                            double[] b_im)
Solves a system of complex equations.

Parameters:
R_re - The real part of the right triangular matrix.
R_im - The imaginary part of the right 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[][] R_re,
                            double[][] R_im,
                            double[] x_re,
                            double[] x_im,
                            double[] b_re,
                            double[] b_im)
Solves a system of complex equations.

Parameters:
R_re - The real part of the right triangular matrix.
R_im - The imaginary part of the right 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[][] R,
                            double[][] B)
Solves a system of real equations.

Parameters:
R - The right 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[][] R,
                            double[][] X,
                            double[][] B)
Solves a system of real equations.

Parameters:
R - The right 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[][] R_re,
                            double[][] R_im,
                            double[][] B_re,
                            double[][] B_im)
Solves a system of complex equations.

Parameters:
R_re - The real part of the right triangular matrix.
R_im - The imaginary part of the right 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[][] R_re,
                            double[][] R_im,
                            double[][] X_re,
                            double[][] X_im,
                            double[][] B_re,
                            double[][] B_im)
Solves a system of complex equations.

Parameters:
R_re - The real part of the right triangular matrix.
R_im - The imaginary part of the right 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.