org.opensourcephysics.numerics
Class LUPDecomposition

java.lang.Object
  extended by org.opensourcephysics.numerics.LUPDecomposition

public class LUPDecomposition
extends java.lang.Object

Lower Upper Permutation (LUP) decomposition See Object Oriented Implementation of Numerical Methods by Didier H. Besset.

Author:
Didier H. Besset

Constructor Summary
LUPDecomposition(double[][] components)
          Constructor method
 
Method Summary
 double determinant()
          Gets the determinant.
 double[][] inverseMatrixComponents()
          Calculates the inverse matrix components.
 double[] solve(double[] c)
           
static void symmetrizeComponents(double[][] components)
          Make sure the supplied matrix components are those of a symmetric matrix
 java.lang.String toString()
          Returns a String that represents the value of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LUPDecomposition

public LUPDecomposition(double[][] components)
                 throws java.lang.IllegalArgumentException
Constructor method

Parameters:
components - double[][]
Throws:
java.lang.IllegalArgumentException
Method Detail

determinant

public double determinant()
Gets the determinant.

Returns:
double[]

inverseMatrixComponents

public double[][] inverseMatrixComponents()
Calculates the inverse matrix components.

Returns:
the matrix inverse or null if the inverse does not exist

symmetrizeComponents

public static void symmetrizeComponents(double[][] components)
Make sure the supplied matrix components are those of a symmetric matrix

Parameters:
components - double

solve

public double[] solve(double[] c)
Parameters:
c - double[]
Returns:
double[]

toString

public java.lang.String toString()
Returns a String that represents the value of this object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the receiver