Package no.uib.cipr.matrix
Class DenseLU
java.lang.Object
no.uib.cipr.matrix.DenseLU
Dense LU decomposition
FIXME: DenseLU is broken! Fix it
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates an LU decomposition of the given matrixstatic DenseLUCreates an LU decomposition of the given matrixgetL()Returns the lower triangular factorgetLU()Returns the decomposition matrixint[]Returns the row pivotsgetU()Returns the upper triangular factorbooleanChecks for singularitydoublercond(Matrix A, Matrix.Norm norm) Computes the reciprocal condition number, using either the infinity norm of the 1 norm.solve(DenseMatrix B) ComputesA\B, overwritingBComputesAT\B, overwritingB
-
Constructor Details
-
DenseLU
public DenseLU(int m, int n) Constructor for DenseLU- Parameters:
m- Number of rowsn- Number of columns
-
-
Method Details
-
factorize
Creates an LU decomposition of the given matrix- Parameters:
A- Matrix to decompose. Not modified- Returns:
- The current decomposition
-
factor
Creates an LU decomposition of the given matrix- Parameters:
A- Matrix to decompose. Overwritten with the decomposition- Returns:
- The current decomposition
-
getL
Returns the lower triangular factor -
getU
Returns the upper triangular factor -
getLU
Returns the decomposition matrix -
rcond
Computes the reciprocal condition number, using either the infinity norm of the 1 norm.- Parameters:
A- The matrix this is a decomposition ofnorm- EitherNorm.OneorNorm.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
ComputesA\B, overwritingB- Throws:
MatrixSingularException
-
transSolve
ComputesAT\B, overwritingB- Throws:
MatrixSingularException
-