Package matrixmultiply.challenge
Class ParallelDivideAndConquerMatrixMultiplier
java.lang.Object
matrixmultiply.challenge.ParallelDivideAndConquerMatrixMultiplier
- All Implemented Interfaces:
MatrixMultiplier
- Author:
- Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
-
Constructor Details
-
ParallelDivideAndConquerMatrixMultiplier
- Parameters:
isParallelPredicate- predicate when tested with the size of the current sub-matrix returns true when parallel tasks should be created, false otherwise.
-
-
Method Details
-
multiply
public double[][] multiply(double[][] a, double[][] b) throws InterruptedException, ExecutionExceptionDescription copied from interface:MatrixMultiplier- Specified by:
multiplyin interfaceMatrixMultiplier- Parameters:
a- an n by m matrixb- an m by p matrix- Returns:
- a new n by p matrix which is the result of multiplying a x b
- Throws:
InterruptedException- if the computation was cancelledExecutionException- if the computation threw an exception
-
toString
-