Class ComplexLU

java.lang.Object
org.flag4j.linalg.decompositions.lu.LU<CMatrix>
org.flag4j.linalg.decompositions.lu.ComplexLU
All Implemented Interfaces:
Decomposition<CMatrix>

public class ComplexLU extends LU<CMatrix>

Complex128his class provides methods for computing the LU decomposition of a complex dense matrix.

Complex128he following decompositions are provided: A=LU, PA=LU, and PAQ=LU.

  • Constructor Details

    • ComplexLU

      public ComplexLU()
      Constructs a LU decomposer to decompose the specified matrix using partial pivoting.
    • ComplexLU

      public ComplexLU(LU.Pivoting pivoting)
      Constructs a LU decomposer to decompose the specified matrix.
      Parameters:
      pivoting - Pivoting to use in the LU decomposition.
    • ComplexLU

      public ComplexLU(LU.Pivoting pivoting, double zeroPivotTol)
      Constructs a LU decomposer to decompose the specified matrix.
      Parameters:
      pivoting - Pivoting to use. If pivoting is 2, full pivoting will be used. If pivoting is 1, partial pivoting will be used. If pivoting is any other value, no pivoting will be used.
      zeroPivotTol - Value for determining if a zero pivot value is detected when computing the LU decomposition with no pivoting. If a pivot value (value along the principle diagonal of U) is within this tolerance from zero, then an exception will be thrown if solving with no pivoting.
  • Method Details

    • initLU

      protected void initLU(CMatrix src)
      Initializes the LU matrix by copying the source matrix to decompose.
      Specified by:
      initLU in class LU<CMatrix>
      Parameters:
      src - Source matrix to decompose.
    • noPivot

      protected void noPivot()
      Computes the LU decomposition using no pivoting (i.e. rows and columns are not swapped).
      Specified by:
      noPivot in class LU<CMatrix>
    • partialPivot

      protected void partialPivot()
      Computes the LU decomposition using partial pivoting (i.e. row swapping).
      Specified by:
      partialPivot in class LU<CMatrix>
    • fullPivot

      protected void fullPivot()
      Computes the LU decomposition using full/rook pivoting (i.e. row and column swapping).
      Specified by:
      fullPivot in class LU<CMatrix>
    • getL

      public CMatrix getL()
      Gets the unit lower triangular matrix of the decomposition.
      Specified by:
      getL in class LU<CMatrix>
      Returns:
      Complex128he lower triangular matrix of the decomposition.
    • getU

      public CMatrix getU()
      Gets the upper triangular matrix of the decomposition.
      Specified by:
      getU in class LU<CMatrix>
      Returns:
      Complex128he lower triangular matrix of the decomposition.