Class MatrixMultiplyDispatcher
java.lang.Object
org.flag4j.linalg.ops.MatrixMultiplyDispatcher
Dispatches matrix multiplication to the appropriate algorithm based on the size of the matrices to be multiplied.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.flag4j.linalg.ops.MatrixMultiplyDispatcher.AlgorithmNamechooseAlgorithmRealComplex(Shape shape1, Shape shape2) Dynamically chooses matrix multiply algorithm based on the shapes of the two matrices to multiply.static org.flag4j.linalg.ops.MatrixMultiplyDispatcher.AlgorithmNameDynamically chooses matrix-vector multiply algorithm based on the shapes of the matrix to multiply.static Complex128[]Dispatches a matrix multiplication problem to the appropriate algorithm based on the size.static CVectorDynamically chooses the appropriate matrix-vector multiplication algorithm based on the shapes of the matrix and vector.static Complex128[]Dispatches a matrix multiplication problem to the appropriate algorithm based on the size.static Complex128[]Dynamically chooses the appropriate matrix-vector multiplication algorithm based on the shapes of the matrix and vector.
-
Method Details
-
dispatch
Dynamically chooses the appropriate matrix-vector multiplication algorithm based on the shapes of the matrix and vector.- Parameters:
A- Matrix to multiply.b- Vector to multiply.- Returns:
- The result of the matrix-vector multiplication.
-
dispatch
-
dispatch
Dispatches a matrix multiplication problem to the appropriate algorithm based on the size.- Parameters:
A- First matrix in matrix multiplication.B- Second matrix in matrix multiplication.- Returns:
- The result of the matrix multiplication.
- Throws:
IllegalArgumentException- If the shapes of the two matrices are not conducive to matrix multiplication.
-
dispatch
Dispatches a matrix multiplication problem to the appropriate algorithm based on the size.- Parameters:
A- First matrix in matrix multiplication.B- Second matrix in matrix multiplication.- Returns:
- The result of the matrix multiplication.
- Throws:
IllegalArgumentException- If the shapes of the two matrices are not conducive to matrix multiplication.
-
chooseAlgorithmRealComplex
public static org.flag4j.linalg.ops.MatrixMultiplyDispatcher.AlgorithmName chooseAlgorithmRealComplex(Shape shape1, Shape shape2) Dynamically chooses matrix multiply algorithm based on the shapes of the two matrices to multiply.- Parameters:
shape1- The shape of the first matrix.shape2- The shape fo the second matrix.- Returns:
- The algorithm to use in the matrix multiplication.
-
chooseAlgorithmRealComplexVector
public static org.flag4j.linalg.ops.MatrixMultiplyDispatcher.AlgorithmName chooseAlgorithmRealComplexVector(Shape shape) Dynamically chooses matrix-vector multiply algorithm based on the shapes of the matrix to multiply.- Parameters:
shape- The shape of the matrix.- Returns:
- The algorithm to use in the matrix multiplication.
-