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

◆ diagonal() [1/2]

template<typename T , typename = require_all_kernel_expressions_and_none_scalar_t<T>>
auto stan::math::diagonal ( T &&  m)
inline

Diagonal of a kernel generator expression.

Return a column vector of the diagonal elements of the specified matrix.

Diagonal is represented as a column vector.

Template Parameters
Ttype of argument
Parameters
ainput argument
Returns
Diagonal of given expression

The matrix is not required to be square.

Template Parameters
Ttype of the matrix
Parameters
mSpecified matrix.
Returns
Diagonal of the matrix.

Definition at line 136 of file diagonal.hpp.