Class DenseFieldDeterminant

java.lang.Object
org.flag4j.linalg.ops.dense.field_ops.DenseFieldDeterminant

public final class DenseFieldDeterminant extends Object
This utility class contains methods for computing the determinant of a dense matrix whose data are elements of a Field.
  • Method Details

    • det

      public static <T extends Field<T>> T det(AbstractDenseFieldMatrix<?,?,T> mat)
      Computes the determinant of a square matrix.
      Parameters:
      mat - Matrix to compute the determinant of.
      Returns:
      The determinant of the matrix.
      Throws:
      IllegalArgumentException - If matrix is not square.
    • detLU

      public static <T extends Field<T>> T detLU(AbstractDenseFieldMatrix<?,?,T> mat)
      Computes the determinant of a square matrix using the LU factorization.
      Parameters:
      mat - Matrix to compute the determinant of.
      Returns:
      The determinant of the matrix.
      Throws:
      IllegalArgumentException - If matrix is not square.
    • detTri

      public static <T extends Field<T>> T detTri(AbstractDenseFieldMatrix<?,?,T> tri)
      Computes the determinant of a triangular matrix.
      Parameters:
      tri - Triangular matrix.
      Returns:
      The determinant of the triangular matrix T.
    • detTriUnsafe

      public static <T extends Field<T>> T detTriUnsafe(AbstractDenseFieldMatrix<?,?,T> tri)

      Computes the determinant of a triangular matrix.

      WARNING: This method does not make any sanity checks. That is, no checks are made that tri is square or triangular.

      Parameters:
      tri - Triangular matrix. Assumed to be a square triangular matrix.
      Returns:
      The determinant of the triangular matrix tri.
    • det3

      public static <T extends Field<T>> T det3(AbstractDenseFieldMatrix<?,?,T> mat)
      Explicitly computes the determinant of a 3x3 matrix.
      Parameters:
      mat - Matrix to compute the determinant of.
      Returns:
      The determinant of the 3x3 matrix.
    • det2

      public static <T extends Field<T>> T det2(AbstractDenseFieldMatrix<?,?,T> mat)
      Explicitly computes the determinant of a 2x2 matrix.
      Parameters:
      mat - Matrix to compute the determinant of.
      Returns:
      The determinant of the 2x2 matrix.
    • det1

      public static <T extends Field<T>> T det1(AbstractDenseFieldMatrix<?,?,T> mat)
      Explicitly computes the determinant of a 1x1 matrix.
      Parameters:
      mat - Matrix to compute the determinant of.
      Returns:
      The determinant of the 1x1 matrix.