This is an old version, view current version.

9.1 Compound addition and assignment

void operator+=(int x, int y)
x += y is equivalent to x = x + y.
Available since 2.17

void operator+=(real x, real y)
x += y is equivalent to x = x + y.
Available since 2.17

void operator+=(vector x, real y)
x += y is equivalent to x = x + y.
Available since 2.17

void operator+=(row_vector x, real y)
x += y is equivalent to x = x + y.
Available since 2.17

void operator+=(matrix x, real y)
x += y is equivalent to x = x + y.
Available since 2.17

void operator+=(vector x, vector y)
x += y is equivalent to x = x + y.
Available since 2.17

void operator+=(row_vector x, row_vector y)
x += y is equivalent to x = x + y.
Available since 2.17

void operator+=(matrix x, matrix y)
x += y is equivalent to x = x + y.
Available since 2.17