From fe896743d10819fbb45e194e5412ba04a4e8c771 Mon Sep 17 00:00:00 2001 From: kai Date: Sat, 31 May 2025 12:57:40 +0200 Subject: [PATCH] try to fix get_row --- lab10/jacobi/matrix.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lab10/jacobi/matrix.h b/lab10/jacobi/matrix.h index af83842..f53032c 100644 --- a/lab10/jacobi/matrix.h +++ b/lab10/jacobi/matrix.h @@ -115,7 +115,9 @@ public: Matrix &operator/=(double x); std::vector &get_row(int i) { - return slice(i * this->cols(), this->cols()); + size_t start = i * this->numCols_; + return std::vector(this->data() + start, + this->data() + start + this->numCols_); } private: