Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ lb_constrain() [13/14]

template<typename T , typename L , require_all_stan_scalar_t< T, L > * = nullptr, require_any_var_t< T, L > * = nullptr>
auto stan::math::lb_constrain ( const T &  x,
const L &  lb,
var lp 
)
inline

Return the lower-bounded value for the specified unconstrained input and specified lower bound.

The transform applied is

\(f(x) = \exp(x) + L\)

where \(L\) is the constant lower bound.

If the lower bound is negative infinity, this function reduces to identity_constrain(x).

Template Parameters
TScalar
LScalar
Parameters
[in]xUnconstrained input
[in]lblower bound on constrained output
[in,out]lpreference to log probability to increment
Returns
lower bound constrained value corresponding to inputs

Definition at line 92 of file lb_constrain.hpp.