Class Decomposition

java.lang.Object
org.episteme.core.mathematics.linearalgebra.Decomposition

public final class Decomposition extends Object
High-level utility for matrix decompositions.

This class abstracts the provider system, automatically selecting the most efficient implementation (Native LAPACK, EJML, or Core) based on matrix characteristics and available hardware.

Since:
1.2
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • qr

      public static <E> QRResult<E> qr(Matrix<E> matrix)
      Computes the QR decomposition of the specified matrix.
      Type Parameters:
      E - the element type
      Parameters:
      matrix - the matrix to decompose
      Returns:
      the QR result
    • svd

      public static <E> SVDResult<E> svd(Matrix<E> matrix)
      Computes the Singular Value Decomposition (SVD) of the specified matrix.
      Type Parameters:
      E - the element type
      Parameters:
      matrix - the matrix to decompose
      Returns:
      the SVD result
    • eigen

      public static <E> EigenResult<E> eigen(Matrix<E> matrix)
      Computes the eigenvalue decomposition of the specified matrix.
      Type Parameters:
      E - the element type
      Parameters:
      matrix - the matrix to decompose
      Returns:
      the eigenvalue result
    • lu

      public static <E> LUResult<E> lu(Matrix<E> matrix)
      Computes the LU decomposition of the specified matrix.
      Type Parameters:
      E - the element type
      Parameters:
      matrix - the matrix to decompose
      Returns:
      the LU result
    • cholesky

      public static <E> CholeskyResult<E> cholesky(Matrix<E> matrix)
      Computes the Cholesky decomposition of the specified matrix.
      Type Parameters:
      E - the element type
      Parameters:
      matrix - the matrix to decompose
      Returns:
      the Cholesky result
    • solve

      public static <E> Vector<E> solve(Matrix<E> a, Vector<E> b)
      Solves Ax = b using the most appropriate decomposition.
      Type Parameters:
      E - the element type
      Parameters:
      a - the coefficient matrix A
      b - the right-hand side vector B
      Returns:
      the solution vector X
    • bicgstab

      public static <E> Vector<E> bicgstab(Matrix<E> a, Vector<E> b, Vector<E> x0, E tolerance, int maxIterations)
      Solves Ax = b using BiCGSTAB.
    • conjugateGradient

      public static <E> Vector<E> conjugateGradient(Matrix<E> a, Vector<E> b, Vector<E> x0, E tolerance, int maxIterations)
      Solves Ax = b using Conjugate Gradient.
    • gmres

      public static <E> Vector<E> gmres(Matrix<E> a, Vector<E> b, Vector<E> x0, E tolerance, int maxIterations, int restarts)
      Solves Ax = b using GMRES.