Automatic Differentiation
 
Loading...
Searching...
No Matches
diagonal.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_DIAGONAL_HPP
2#define STAN_MATH_PRIM_FUN_DIAGONAL_HPP
3
6
7namespace stan {
8namespace math {
9
18template <typename T, require_matrix_t<T>* = nullptr>
19inline auto diagonal(const T& m) {
20 return m.diagonal();
21}
22
23} // namespace math
24} // namespace stan
25
26#endif
auto diagonal(T &&a)
Diagonal of a kernel generator expression.
Definition diagonal.hpp:136
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...