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

◆ diagonal() [2/3]

template<typename T , require_all_kernel_expressions_and_none_scalar_t< T > * = nullptr>
var_value< matrix_cl< double > > stan::math::diagonal ( const var_value< T > &  M)
inline

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

The matrix is not required to be square.

Parameters
MSpecified matrix.
Returns
Diagonal of the matrix.

Definition at line 21 of file diagonal.hpp.