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

◆ add_diag() [1/3]

template<typename T_m , typename T_a , require_all_kernel_expressions_and_none_scalar_t< T_m > * = nullptr, require_all_kernel_expressions_t< T_a > * = nullptr>
auto stan::math::add_diag ( T_m &&  mat,
T_a &&  to_add 
)
inline

Returns a Matrix with values added along the main diagonal.

Template Parameters
T_mtype of input kernel generator expression for the input matrix
T_atype of input kernel generator expression to add along the diagonal
Parameters
matinput kernel generator expression
to_addscalar value or input kernel generator expression to add along the diagonal
Returns
a kernel generator expressio with to_add added along main diagonal

Definition at line 27 of file add_diag.hpp.