Package org.opensourcephysics.numerics
Class LUPDecomposition
java.lang.Object
org.opensourcephysics.numerics.LUPDecomposition
Lower Upper Permutation (LUP) decomposition
See Object Oriented Implementation of Numerical Methods by Didier H. Besset.
- Author:
- Didier H. Besset
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleGets the determinant.double[][]Calculates the inverse matrix components.double[]solve(double[] c) static voidsymmetrizeComponents(double[][] components) Make sure the supplied matrix components are those of a symmetric matrixtoString()Returns a String that represents the value of this object.
-
Constructor Details
-
LUPDecomposition
Constructor method- Parameters:
components- double[][]- Throws:
IllegalArgumentException
-
-
Method Details
-
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
Returns a String that represents the value of this object.
-