Class FieldLU<T extends Field<T>>

java.lang.Object
org.flag4j.linalg.decompositions.lu.LU<FieldMatrix<T>>
org.flag4j.linalg.decompositions.lu.FieldLU<T>
All Implemented Interfaces:
Decomposition<FieldMatrix<T>>

public class FieldLU<T extends Field<T>> extends LU<FieldMatrix<T>>

This class provides methods for computing the LU decomposition of a dense matrix whose elements are members of a Field.

The following decompositions are provided: A=LU, PA=LU, and PAQ=LU which are determined by the pivoting used. .

  • Constructor Details

    • FieldLU

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

      public FieldLU(LU.Pivoting pivoting)
      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.
    • FieldLU

      public FieldLU(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(FieldMatrix<T> src)
      Initializes the LU matrix by copying the source matrix to decompose.
      Specified by:
      initLU in class LU<FieldMatrix<T extends Field<T>>>
      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<FieldMatrix<T extends Field<T>>>
    • partialPivot

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

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

      public FieldMatrix<T> getL()
      Gets the unit lower triangular matrix of the decomposition.
      Specified by:
      getL in class LU<FieldMatrix<T extends Field<T>>>
      Returns:
      The lower triangular matrix of the decomposition.
    • getU

      public FieldMatrix<T> getU()
      Gets the upper triangular matrix of the decomposition.
      Specified by:
      getU in class LU<FieldMatrix<T extends Field<T>>>
      Returns:
      The lower triangular matrix of the decomposition.