Class FieldLUDecomposition.Solver<T extends FieldElement<T>>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Field<T> field
      Field to which the elements belong.
      private T[][] lu
      Entries of LU decomposition.
      private int[] pivot
      Pivot permutation associated with LU decomposition.
      private boolean singular
      Singularity indicator.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Solver​(Field<T> field, T[][] lu, int[] pivot, boolean singular)
      Build a solver from decomposed matrix.
    • Field Detail

      • field

        private final Field<T extends FieldElement<T>> field
        Field to which the elements belong.
      • lu

        private final T extends FieldElement<T>[][] lu
        Entries of LU decomposition.
      • pivot

        private final int[] pivot
        Pivot permutation associated with LU decomposition.
      • singular

        private final boolean singular
        Singularity indicator.
    • Constructor Detail

      • Solver

        private Solver​(Field<T> field,
                       T[][] lu,
                       int[] pivot,
                       boolean singular)
        Build a solver from decomposed matrix.
        Parameters:
        field - field to which the matrix elements belong
        lu - entries of LU decomposition
        pivot - pivot permutation associated with LU decomposition
        singular - singularity indicator
    • Method Detail

      • solve

        public FieldVector<T> solve​(FieldVector<T> b)
        Solve the linear equation A × X = B for matrices A.

        The A matrix is implicit, it is provided by the underlying decomposition algorithm.

        Specified by:
        solve in interface FieldDecompositionSolver<T extends FieldElement<T>>
        Parameters:
        b - right-hand side of the equation A × X = B
        Returns:
        a vector X that minimizes the two norm of A × X - B
      • solve

        public FieldMatrix<T> solve​(FieldMatrix<T> b)
        Solve the linear equation A × X = B for matrices A.

        The A matrix is implicit, it is provided by the underlying decomposition algorithm.

        Specified by:
        solve in interface FieldDecompositionSolver<T extends FieldElement<T>>
        Parameters:
        b - right-hand side of the equation A × X = B
        Returns:
        a matrix X that minimizes the two norm of A × X - B