operator+=

void operator+=(DynamicMatrix const &that)

Redefines this to be the sum of *this and that.

Parameters

that – the matrix to add to this.

Returns

(None)

Throws

if the implementation of the semiring plus throws.

Complexity

\(O(mn)\) where \(m\) is number_of_rows() and \(m\) is number_of_cols()

Warning

The matrices must be of the same dimensions, although this is not verified by the implementation.

void operator+=(RowView const &that)

Redefines this to be the sum of *this and that.

Parameters

that – the matrix to add to this.

Returns

(None)

Throws

if the implementation of the semiring plus throws.

Complexity

\(O(mn)\) where \(m\) is number_of_rows() and \(m\) is number_of_cols()

Warning

This function only works if this has a single row, i.e. the template parameter R is 1.

void operator+=(scalar const a)

Adds a scalar to every entry of the matrix in-place.

Parameters

a – the scalar to add to this.

Returns

(None)

Throws

if the implementation of the semiring plus throws.

Complexity

\(O(mn)\) where \(m\) is number_of_rows() and \(m\) is number_of_cols()

Warning

This function only works if this has a single row, i.e. the template parameter R is 1.