Functions | |
std::ostream & | operator<< (std::ostream &os, const Variable &var) |
Variable | operator+ (const double other, const Variable &var) |
Variable | operator- (const double other, const Variable &var) |
Variable | operator* (const double other, const Variable &var) |
Variable | operator/ (const double other, const Variable &var) |
Variable | dot_product (const std::vector< Variable > &a, const std::vector< Variable > &b) |
Variable | dot_product (const std::vector< Variable > &a, const std::vector< double > &b) |
Calculates the dot product of a vector of variables and a vector of scalars.
a | The vector of variables. |
b | The vector of scalars. |
Calculates the dot product of two vectors of variables.
a | The first vector of variables. |
b | The second vector of variables. |
Overloads the multiplication operator to perform element-wise multiplication of a scalar and a variable.
other | The scalar to be multiplied. |
var | The variable to be multiplied. |
Overloads the addition operator to perform element-wise addition of a scalar and a variable.
other | The scalar to be added. |
var | The variable to be added. |
Overloads the subtraction operator to perform element-wise subtraction of a scalar and a variable.
other | The scalar to be subtracted. |
var | The variable to be subtracted. |
Overloads the division operator to perform element-wise division of a scalar and a variable.
other | The scalar to be divided. |
var | The variable to be divided. |
std::ostream& operator<< | ( | std::ostream & | os, |
const Variable & | var | ||
) |
Overloads the stream insertion operator to print the value of the variable.
os | The output stream. |
var | The variable to be printed. |