operator+¶
-
DynamicMatrix operator+(DynamicMatrix const &that)¶
Returns the sum of
*this
andthat
.- Parameters
that – the matrix to add to
this
.- Returns
a value of type
DynamicMatrix()
.- Throws
if the implementation of the semiring plus throws, or
std::bad_alloc
if memory cannot be allocated for the result.- Complexity
\(O(mn)\) where \(m\) is
number_of_rows()
and \(m\) isnumber_of_cols()
Warning
The matrices must be of the same dimensions, although this is not verified by the implementation.