From d4740637c939d0781442ade967cf38378c1d8e4e Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Fri, 22 Sep 2023 00:39:15 -0400 Subject: [PATCH] equal definition, uses an image --- hws/03_matrix_class/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hws/03_matrix_class/README.md b/hws/03_matrix_class/README.md index bdfde8c..3d5a98b 100644 --- a/hws/03_matrix_class/README.md +++ b/hws/03_matrix_class/README.md @@ -37,8 +37,11 @@ with every value initialized to fill. If either dimension is 0, the resulting ma Your class must support the equality operator == and the inequality operator !=. Two matrices are considered to be equal if they have the same value in every position. In other words, matrices A and B are equal if and -only if (∀i,j |i ∈ {0, 1, . . . , m − 2, m − 1}, j ∈ {0, 1, . . . , n − 2, n − 1}) ai,j = bi,j . ∀ is a common shorthand for -“for all,” so ∀i,j means “for every value of i and j.” ∈ is a common shorthand for “in”. +only if + +![alt text](images/matrix_equal_definition.png "matrix equal definition") + +∀ is a common shorthand for “for all,” so ∀i,j means “for every value of i and j.” ∈ is a common shorthand for “in”. Since a matrix has two dimensions, you will need to implement num rows() and num cols() which return the number of rows and the number of columns in the matrix respectively.