Class MatrixTurboEvaluator.EigenProvider

java.lang.Object
com.github.gbenroscience.parser.turbo.tools.MatrixTurboEvaluator.EigenProvider
Enclosing class:
MatrixTurboEvaluator

public static final class MatrixTurboEvaluator.EigenProvider extends Object
  • Constructor Details

    • EigenProvider

      public EigenProvider()
  • Method Details

    • getEigenvalues

      public static Matrix getEigenvalues(int n, double[] matrixData)
      Returns the eigenvalues of a matrix. * Since eigenvalues can be complex, this returns an n x 2 Matrix where Column 0 is the Real part and Column 1 is the Imaginary part.
      Parameters:
      n - The dimension of the square matrix (n x n).
      matrixData - The flat 1D array of the matrix data.
      Returns:
      A Matrix object of size n x 2.
    • getEigenvectors

      public static Matrix getEigenvectors(int n, double[] matrixData)
      Returns the eigenvectors of a matrix as a square Matrix. * This method is "Turbo" optimized because it computes eigenvalues once and passes them directly to the vector solver, avoiding the expensive QR algorithm repetition. * @param n The dimension of the square matrix (n x n).
      Parameters:
      matrixData - The flat 1D array of the matrix data.
      Returns:
      A Matrix object of size n x n where columns are eigenvectors.