Automatic Differentiation
 
Loading...
Searching...
No Matches
trace.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_TRACE_HPP
2#define STAN_MATH_PRIM_FUN_TRACE_HPP
3
6
7namespace stan {
8namespace math {
9
20template <typename T, require_eigen_t<T>* = nullptr,
21 require_not_st_var<T>* = nullptr>
22inline value_type_t<T> trace(const T& m) {
23 return m.trace();
24}
25
26} // namespace math
27} // namespace stan
28
29#endif
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
value_type_t< T > trace(const T &m)
Calculates trace (sum of diagonal) of given kernel generator expression.
Definition trace.hpp:22
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...