From ad4bbe1af0608cdec11672000d9425e8cc60d119 Mon Sep 17 00:00:00 2001 From: Ilya Grigorev Date: Fri, 20 Sep 2024 23:02:25 +0500 Subject: [PATCH] Fix matrix constructor --- tools/matrix.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/matrix.cpp b/tools/matrix.cpp index e9f3200..73b8bf1 100644 --- a/tools/matrix.cpp +++ b/tools/matrix.cpp @@ -77,10 +77,7 @@ std::ostream& operator<<(std::ostream& cout, ColumnVector& vectorObj) { Matrix::Matrix(int n, int m) { rows = n; columns = m; - matrix.resize(n); - for (auto& row : matrix) { - row = ColumnVector(m); - } + matrix.resize(n, ColumnVector(m)); } Matrix::Matrix(const Matrix& other) {