Stan Math Library
4.9.0
Automatic Differentiation
|
|
inline |
Return the upper-bounded value for the specified unconstrained scalar and upper bound and increment the specified log probability reference with the log absolute Jacobian determinant of the transform.
Specialization of ub_constrain
to apply a matrix of upper bounds elementwise to each input element.
The transform is as specified for ub_constrain(T, double)
. The log absolute Jacobian determinant is
\( \log | \frac{d}{dx} -\mbox{exp}(x) + U | = \log | -\mbox{exp}(x) + 0 | = x\).
T | type of scalar |
U | type of upper bound |
S | type of log probability |
[in] | x | free scalar |
[in] | ub | upper bound |
[in,out] | lp | log density |
T | A type inheriting from EigenBase . |
U | A type inheriting from EigenBase . |
[in] | x | unconstrained input |
[in] | ub | upper bound on output |
[in,out] | lp | reference to log probability to increment |
Definition at line 67 of file ub_constrain.hpp.