Stan Math Library
5.0.0
Automatic Differentiation
|
|
inline |
Return the log of the sum of the exponentiated values of the specified matrix of values.
The matrix may be a full matrix, a vector, a row vector.
The function is defined as follows to prevent overflow in exponential calculations.
\(\log \sum_{n=1}^N \exp(x_n) = \max(x) + \log \sum_{n=1}^N \exp(x_n - \max(x))\).
T | type of input vector or matrix |
[in] | a | matrix of specified values |
Definition at line 31 of file log_sum_exp.hpp.