SciLib.Math
Class LinearSystem

java.lang.Object
  extended by SciLib.Math.LinearSystem

public final class LinearSystem
extends java.lang.Object

This class contains some methods to handle the linear system problems


Constructor Summary
LinearSystem()
           
 
Method Summary
static void Gauss(double[][] A, int[] l)
          Perform Gaussian elimination with scaled partial pivoting
static void Gauss(matrix A, integerVector l)
          Perform Gaussian elimination with scaled partial pivoting
static void Solve(double[][] A, double[] b, double[] x, int[] l)
          Solve linear system Ax = b
static vector Solve(matrix A, vector b, integerVector l)
          Solve linear system Ax = b
static void SolveLinEq(double[][] A, double[] b, double[] x)
          Solve linear system Ax = b
static vector SolveLinEq(matrix A, vector b)
          Solve linear system Ax = b
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearSystem

public LinearSystem()
Method Detail

Gauss

public static void Gauss(double[][] A,
                         int[] l)
Perform Gaussian elimination with scaled partial pivoting

Parameters:
A - A two-dimensional array that contains the matrix coeeficient
l - An integer array that stores the result index

Solve

public static void Solve(double[][] A,
                         double[] b,
                         double[] x,
                         int[] l)
Solve linear system Ax = b

Parameters:
A - A two-dimensional array that stores the result after performing Gaussian elimination
l - An integer array that stores the result index
b - An array
x - An array that stores the solution of the system

SolveLinEq

public static void SolveLinEq(double[][] A,
                              double[] b,
                              double[] x)
Solve linear system Ax = b

Parameters:
A - A two-dimensional array that stores the result after performing Gaussian elimination
b - An array
x - An array that stores the solution of the system

Gauss

public static void Gauss(matrix A,
                         integerVector l)
                  throws SizeException
Perform Gaussian elimination with scaled partial pivoting

Parameters:
A - The matrix coeeficient
l - A vector that stores the result index
Throws:
SizeException

Solve

public static vector Solve(matrix A,
                           vector b,
                           integerVector l)
                    throws SizeException
Solve linear system Ax = b

Parameters:
A - The matrix coeeficient
l - A vector that stores the result index
b - A vector
Returns:
The solution vector
Throws:
SizeException

SolveLinEq

public static vector SolveLinEq(matrix A,
                                vector b)
Solve linear system Ax = b

Parameters:
A - The matrix coeeficient
b - A vector
Returns:
The solution vector