Class RealDenseMatrixMultiplyDispatcher
java.lang.Object
org.flag4j.linalg.ops.RealDenseMatrixMultiplyDispatcher
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enum
Simple enum class containing all possible choices of real dense matrix multiply algorithms. -
Method Summary
Modifier and TypeMethodDescriptionstatic double[]
Dispatches a matrix multiply problem to the appropriate algorithm based on the size of the matrices.static double[]
Dispatches a matrix multiply problem to the appropriate algorithm based on the size of the matrices.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.Gets the singleton instance of this class.
-
Method Details
-
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
-
dispatch
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
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
andB
.
-