org.simBio.util.numerical.methods
Class LUdecomposition

java.lang.Object
  extended by org.simBio.util.numerical.methods.LUdecomposition

public final class LUdecomposition
extends java.lang.Object

This class provides LU decomposition method to solve system of linear equations.

Version:
$Revision: 1.1 $
Author:
SHIMAYOSHI Takao

Method Summary
protected static double decomposite(int n, double[] lu, int[] ip)
          Decomposite the specified array to LU array.
static double solve(double[] a, double[] b, double[] x)
          Solves the specified linear equations.
protected static void solveWithLU(int n, double[] lu, double[] b, int[] ip, double[] x)
          Solves the system of linear equations with LU array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

solve

public static double solve(double[] a,
                           double[] b,
                           double[] x)
Solves the specified linear equations.

Parameters:
a - The coefficient matrix. Its elements are not changed.
b - The vector of the right-hand side. Its elements are not changed.
x - The vector to be stored the solution.
Returns:
The determinant of the coefficient matrix.

decomposite

protected static double decomposite(int n,
                                    double[] lu,
                                    int[] ip)
Decomposite the specified array to LU array.

Parameters:
n - The order of the system.
lu - The array to be decomposited.
ip - The vector to be stored pivoted lines.
Returns:
The determinant of LU array.

solveWithLU

protected static void solveWithLU(int n,
                                  double[] lu,
                                  double[] b,
                                  int[] ip,
                                  double[] x)
Solves the system of linear equations with LU array.

Parameters:
n - The order of the system.
lu - The LU decomposited array.
b - The vector of the right-hand side.
ip - The vector of pivoted lines.
x - The vector to be stored the solution.


Copyright © 2002-2008 Cell/Biodinamics simulation project. All Rights Reserved.