From 45b16003d48d14916ed11c1ddc302bfeb04fa7c9 Mon Sep 17 00:00:00 2001 From: bbod Date: Sun, 29 Mar 2020 21:07:53 -0600 Subject: [PATCH] fixed flatten matrix --- HW10/ParseMatrixForMPI.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HW10/ParseMatrixForMPI.h b/HW10/ParseMatrixForMPI.h index f76d13c..b4f1a46 100644 --- a/HW10/ParseMatrixForMPI.h +++ b/HW10/ParseMatrixForMPI.h @@ -24,7 +24,7 @@ namespace matrixTools std::vector rVector((rowSize*columnSize), 0); for (int i = 0; i < columnSize; i++) { for (int j = 0; j < rowSize; j++) { - rVector[i + j] = matrix[i][j]; + rVector[j*i] = matrix[i][j]; } } return rVector;