Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ add() [4/15]

template<typename Mat1 , typename Mat2 , require_all_eigen_t< Mat1, Mat2 > * = nullptr, require_all_not_st_var< Mat1, Mat2 > * = nullptr>
auto stan::math::add ( const Mat1 &  m1,
const Mat2 &  m2 
)
inline

Return the sum of the specified matrices.

The two matrices must have the same dimensions.

Template Parameters
Mat1type of the first matrix or expression
Mat2type of the second matrix or expression
Parameters
m1First matrix or expression.
m2Second matrix or expression.
Returns
Sum of the matrices.
Exceptions
std::invalid_argumentif m1 and m2 do not have the same dimensions.

Definition at line 43 of file add.hpp.