Stan Math Library
4.9.0
Automatic Differentiation
|
|
inline |
Return the upper-bounded value for the specified unconstrained matrix and upper bound.
Specialization of ub_constrain
to apply a matrix of upper bounds elementwise to each input element.
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.
The transform is
\(f(x) = U - \exp(x)\)
where \(U\) is the upper bound.
T | type of Matrix |
U | type of upper bound |
[in] | x | free Matrix. |
[in] | ub | upper bound |
[in,out] | lp | reference to log probability to increment |
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 |
[in] | x | free scalar |
[in] | ub | upper bound |
[in,out] | lp | log density |
T | A type inheriting from EigenBase or a var_value with inner type inheriting from EigenBase . |
U | A type inheriting from EigenBase or a var_value with inner 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 60 of file ub_constrain.hpp.