diff --git a/content/data-structures/Matrix.h b/content/data-structures/Matrix.h index 642ef7ace..d5ee1f35b 100644 --- a/content/data-structures/Matrix.h +++ b/content/data-structures/Matrix.h @@ -6,7 +6,7 @@ * Description: Basic operations on square matrices. * Usage: Matrix A; * A.d = {{{{1,2,3}}, {{4,5,6}}, {{7,8,9}}}}; - * vector vec = {1,2,3}; + * array vec = {1,2,3}; * vec = (A^N) * vec; * Status: tested */ @@ -21,8 +21,8 @@ template struct Matrix { rep(k,0,N) a.d[i][j] += d[i][k]*m.d[k][j]; return a; } - vector operator*(const vector& vec) const { - vector ret(N); + array operator*(const array& vec) const { + array ret{}; rep(i,0,N) rep(j,0,N) ret[i] += d[i][j] * vec[j]; return ret; }