Class FieldLUDecomposition<T extends FieldElement<T>>

  • Type Parameters:
    T - the type of the field elements

    public class FieldLUDecomposition<T extends FieldElement<T>>
    extends Object
    Calculates the LUP-decomposition of a square matrix.

    The LUP-decomposition of a matrix A consists of three matrices L, U and P that satisfy: PA = LU, L is lower triangular, and U is upper triangular and P is a permutation matrix. All matrices are m×m.

    Since field elements do not provide an ordering operator, the permutation matrix is computed here only in order to avoid a zero pivot element, no attempt is done to get the largest pivot element.

    This class is based on the class with similar name from the JAMA library.

    • a getP method has been added,
    • the det method has been renamed as getDeterminant,
    • the getDoublePivot method has been removed (but the int based getPivot method has been kept),
    • the solve and isNonSingular methods have been replaced by a getSolver method and the equivalent methods provided by the returned DecompositionSolver.
    2.0 (changed to concrete class in 3.0)
    See Also:
    MathWorld, Wikipedia
    • Method Detail

      • getL

        public FieldMatrix<TgetL()
        Returns the matrix L of the decomposition.

        L is a lower-triangular matrix

        the L matrix (or null if decomposed matrix is singular)
      • getU

        public FieldMatrix<TgetU()
        Returns the matrix U of the decomposition.

        U is an upper-triangular matrix

        the U matrix (or null if decomposed matrix is singular)
      • getP

        public FieldMatrix<TgetP()
        Returns the P rows permutation matrix.

        P is a sparse matrix with exactly one element set to 1.0 in each row and each column, all other elements being set to 0.0.

        The positions of the 1 elements are given by the pivot permutation vector.

        the P rows permutation matrix (or null if decomposed matrix is singular)
        See Also:
      • getPivot

        public int[] getPivot()
        Returns the pivot permutation vector.
        the pivot permutation vector
        See Also:
      • getDeterminant

        public T getDeterminant()
        Return the determinant of the matrix.
        determinant of the matrix