Package no.uib.cipr.matrix
Class DenseLU
- java.lang.Object
-
- no.uib.cipr.matrix.DenseLU
-
public class DenseLU extends java.lang.Object
Dense LU decomposition FIXME: DenseLU is broken! Fix it
-
-
Constructor Summary
Constructors Constructor Description DenseLU(int m, int n)
Constructor for DenseLU
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DenseLU
factor(DenseMatrix A)
Creates an LU decomposition of the given matrixstatic DenseLU
factorize(Matrix A)
Creates an LU decomposition of the given matrixUnitLowerTriangDenseMatrix
getL()
Returns the lower triangular factorDenseMatrix
getLU()
Returns the decomposition matrixint[]
getPivots()
Returns the row pivotsUpperTriangDenseMatrix
getU()
Returns the upper triangular factorboolean
isSingular()
Checks for singularitydouble
rcond(Matrix A, Matrix.Norm norm)
Computes the reciprocal condition number, using either the infinity norm of the 1 norm.DenseMatrix
solve(DenseMatrix B)
ComputesA\B
, overwritingB
DenseMatrix
transSolve(DenseMatrix B)
ComputesAT\B
, overwritingB
-
-
-
Method Detail
-
factorize
public static DenseLU factorize(Matrix A)
Creates an LU decomposition of the given matrix- Parameters:
A
- Matrix to decompose. Not modified- Returns:
- The current decomposition
-
factor
public DenseLU factor(DenseMatrix A)
Creates an LU decomposition of the given matrix- Parameters:
A
- Matrix to decompose. Overwritten with the decomposition- Returns:
- The current decomposition
-
getL
public UnitLowerTriangDenseMatrix getL()
Returns the lower triangular factor
-
getU
public UpperTriangDenseMatrix getU()
Returns the upper triangular factor
-
getLU
public DenseMatrix getLU()
Returns the decomposition matrix
-
rcond
public double rcond(Matrix A, Matrix.Norm norm)
Computes the reciprocal condition number, using either the infinity norm of the 1 norm.- Parameters:
A
- The matrix this is a decomposition ofnorm
- EitherNorm.One
orNorm.Infinity
- Returns:
- The reciprocal condition number. Values close to unity indicate a well-conditioned system, while numbers close to zero do not.
-
getPivots
public int[] getPivots()
Returns the row pivots
-
isSingular
public boolean isSingular()
Checks for singularity
-
solve
public DenseMatrix solve(DenseMatrix B) throws MatrixSingularException
ComputesA\B
, overwritingB
- Throws:
MatrixSingularException
-
transSolve
public DenseMatrix transSolve(DenseMatrix B) throws MatrixSingularException
ComputesAT\B
, overwritingB
- Throws:
MatrixSingularException
-
-