6.4 Elementwise functions
Elementwise functions apply a function to each element of a vector or matrix, returning a result of the same shape as the argument. There are many functions that are vectorized in addition to the ad hoc cases listed in this section; see section function vectorization for the general cases.
vector operator.*(vector x, vector y)
The elementwise product of y and x
Available since 2.0
row_vector operator.*(row_vector x, row_vector y)
The elementwise product of y and x
Available since 2.0
matrix operator.*(matrix x, matrix y)
The elementwise product of y and x
Available since 2.0
vector operator./(vector x, vector y)
The elementwise quotient of y and x
Available since 2.0
vector operator./(vector x, real y)
The elementwise quotient of y and x
Available since 2.4
vector operator./(real x, vector y)
The elementwise quotient of y and x
Available since 2.4
row_vector operator./(row_vector x, row_vector y)
The elementwise quotient of y and x
Available since 2.0
row_vector operator./(row_vector x, real y)
The elementwise quotient of y and x
Available since 2.4
row_vector operator./(real x, row_vector y)
The elementwise quotient of y and x
Available since 2.4
matrix operator./(matrix x, matrix y)
The elementwise quotient of y and x
Available since 2.0
matrix operator./(matrix x, real y)
The elementwise quotient of y and x
Available since 2.4
matrix operator./(real x, matrix y)
The elementwise quotient of y and x
Available since 2.4
vector operator.^(vector x, vector y)
The elementwise power of y and x
Available since 2.24
vector operator.^(vector x, real y)
The elementwise power of y and x
Available since 2.24
vector operator.^(real x, vector y)
The elementwise power of y and x
Available since 2.24
row_vector operator.^(row_vector x, row_vector y)
The elementwise power of y and x
Available since 2.24
row_vector operator.^(row_vector x, real y)
The elementwise power of y and x
Available since 2.24
row_vector operator.^(real x, row_vector y)
The elementwise power of y and x
Available since 2.24
matrix operator.^(matrix x, matrix y)
The elementwise power of y and x
Available since 2.24
matrix operator.^(matrix x, real y)
The elementwise power of y and x
Available since 2.24
matrix operator.^(real x, matrix y)
The elementwise power of y and x
Available since 2.24