Package no.uib.cipr.matrix
Class BandLU
java.lang.Object
no.uib.cipr.matrix.BandLU
Banded LU decomposition
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfactor
(BandMatrix A) Creates an LU decomposition of the given matrixfactor
(BandMatrix A, boolean inplace) Creates an LU decomposition of the given matrixstatic BandLU
Creates an LU decomposition of the given matrixgetL()
Returns the lower triangular factorgetLU()
Returns the decomposition matrixint[]
Returns the row pivotsgetU()
Returns the upper triangular factorboolean
Checks for singularitydouble
rcond
(Matrix A, Matrix.Norm norm) Computes the reciprocal condition number, using either the infinity norm of the 1 norm.solve
(DenseMatrix B) ComputesA\B
, overwritingB
ComputesAT\B
, overwritingB
-
Constructor Details
-
BandLU
public BandLU(int n, int kl, int ku) Constructor for BandLU- Parameters:
n
- Matrix sizekl
- Number of lower matrix bandsku
- Number of upper matrix bands
-
-
Method Details
-
factorize
Creates an LU decomposition of the given matrix- Parameters:
A
- Matrix to decompose. Not modified- Returns:
- A LU decomposition of the matrix
-
factor
Creates an LU decomposition of the given matrix- Parameters:
A
- Matrix to decompose. If the decomposition is in-place, its number of superdiagonals must equalkl+ku
inplace
- Wheter or not the decomposition should overwrite the passed matrix- Returns:
- The current decomposition
-
factor
Creates an LU decomposition of the given matrix- Parameters:
A
- Matrix to decompose. It will be overwritten with the decomposition. Its number of superdiagonals must equalkl+ku
- Returns:
- The current decomposition
-
getL
Returns the lower triangular factor -
getU
Returns the upper triangular factor -
getLU
Returns the decomposition matrix -
getPivots
public int[] getPivots()Returns the row pivots -
isSingular
public boolean isSingular()Checks for singularity -
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.One
orNorm.Infinity
- Returns:
- The reciprocal condition number. Values close to unity indicate a well-conditioned system, while numbers close to zero do not.
-
solve
ComputesA\B
, overwritingB
- Throws:
MatrixSingularException
-
transSolve
ComputesAT\B
, overwritingB
- Throws:
MatrixSingularException
-