Class BandLU


  • public class BandLU
    extends java.lang.Object
    Banded LU decomposition
    • Constructor Detail

      • 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 Detail

      • 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
      • 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.