You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add function signature for each function inside the Matrix class in matrix.hpp and also implement in matrix.cpp.
Function specifications:
matmul: Multiplies two Matrices. A Matrix and a scalar is not allowed. Also throw appropriate exception if matrix dimension are not compatible for multiplication.
add: This function will have two overloads one which will add matrix and scalar and the other one for two matrices. Throw appropriate exceptions if matrix have incompatible dimensions.
subtract: Everything same as add function but you should do subtraction instead of addition.
Don't implement from scratch, use the already implemented functions operator +=, operator -= and operator *=. This way you will not have to worry about throwing appropriate exceptions as the already implemented function will do it for you.
Don't forget to add comments above each function signature you add in matrix.hpp. Avoid adding comments in matrix.cpp unless very important.
The text was updated successfully, but these errors were encountered:
Add function signature for each function inside the
Matrix
class inmatrix.hpp
and also implement inmatrix.cpp
.Function specifications:
matmul:
Multiplies two Matrices. A Matrix and a scalar is not allowed. Also throw appropriate exception if matrix dimension are not compatible for multiplication.add:
This function will have two overloads one which will add matrix and scalar and the other one for two matrices. Throw appropriate exceptions if matrix have incompatible dimensions.subtract:
Everything same asadd
function but you should do subtraction instead of addition.Don't implement from scratch, use the already implemented functions
operator +=
,operator -=
andoperator *=
. This way you will not have to worry about throwing appropriate exceptions as the already implemented function will do it for you.Don't forget to add comments above each function signature you add in
matrix.hpp
. Avoid adding comments inmatrix.cpp
unless very important.The text was updated successfully, but these errors were encountered: