Class RealDenseMatrixMultiplyDispatcher

java.lang.Object
org.flag4j.linalg.ops.RealDenseMatrixMultiplyDispatcher

public final class RealDenseMatrixMultiplyDispatcher extends Object
Singleton class which stores a map of all viable real dense matrix multiply algorithms and uses that map to dispatch a real dense matrix multiply problem to the appropriate algorithm.
  • Method Details

    • getInstance

      public static RealDenseMatrixMultiplyDispatcher getInstance()
      Gets the singleton instance of this class. If this class has not been instanced, a new instance will be created.
      Returns:
      The singleton instance of this class.
    • dispatch

      public static double[] dispatch(Matrix A, Matrix B)
      Dispatches a matrix multiply problem to the appropriate algorithm based on the size of the matrices.
      Parameters:
      A - First matrix in the multiplication.
      B - Second matrix in the multiplication.
      Returns:
      The result of the matrix multiplication.
    • dispatch

      public static double[] dispatch(double[] src1, Shape shape1, double[] src2, Shape shape2)
      Dispatches a matrix multiply problem to the appropriate algorithm based on the size of the matrices.
      Parameters:
      src1 - Entries of the first matrix.
      shape1 - Shape of the first matrix.
      src2 - Entries of the second matrix.
      shape2 - Shape of the second matrix.
      Returns:
      The result of the matrix multiplication.
    • dispatchTranspose

      public static double[] dispatchTranspose(Matrix A, Matrix B)
      Dispatches a matrix multiply-transpose problem equivalent to A.mult(B.T()) to the appropriate algorithm based on the size of the matrices.
      Parameters:
      A - First matrix in the multiplication.
      B - Second matrix in the multiplication and the matrix to transpose.
      Returns:
      The matrix multiply-transpose result of A and B.