Class BandLU

java.lang.Object
no.uib.cipr.matrix.BandLU

public class BandLU extends Object
Banded LU decomposition
  • Constructor Details

    • BandLU

      public BandLU(int n, int kl, int ku)
      Constructor for BandLU
      Parameters:
      n - Matrix size
      kl - Number of lower matrix bands
      ku - Number of upper matrix bands
  • Method Details

    • factorize

      public static BandLU factorize(BandMatrix A)
      Creates an LU decomposition of the given matrix
      Parameters:
      A - Matrix to decompose. Not modified
      Returns:
      A LU decomposition of the matrix
    • factor

      public BandLU factor(BandMatrix A, boolean inplace)
      Creates an LU decomposition of the given matrix
      Parameters:
      A - Matrix to decompose. If the decomposition is in-place, its number of superdiagonals must equal kl+ku
      inplace - Wheter or not the decomposition should overwrite the passed matrix
      Returns:
      The current decomposition
    • factor

      public BandLU factor(BandMatrix A)
      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 equal kl+ku
      Returns:
      The current decomposition
    • getL

      Returns the lower triangular factor
    • getU

      public UpperTriangBandMatrix getU()
      Returns the upper triangular factor
    • getLU

      public BandMatrix getLU()
      Returns the decomposition matrix
    • getPivots

      public int[] getPivots()
      Returns the row pivots
    • isSingular

      public boolean isSingular()
      Checks for singularity
    • 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 of
      norm - Either Norm.One or Norm.Infinity
      Returns:
      The reciprocal condition number. Values close to unity indicate a well-conditioned system, while numbers close to zero do not.
    • solve

      Computes A\B, overwriting B
      Throws:
      MatrixSingularException
    • transSolve

      public DenseMatrix transSolve(DenseMatrix B) throws MatrixSingularException
      Computes AT\B, overwriting B
      Throws:
      MatrixSingularException