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

◆ lb_constrain() [5/14]

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

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

Specialization of lb_constrain to apply a matrix of lower bounds elementwise to each input element.

The transform applied is

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

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

Template Parameters
TScalar.
LScalar.
Parameters
[in]xUnconstrained input
[in]lbLower bound
Returns
Constrained matrix

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
Returns
lower bound constrained value corresponding to inputs
Template Parameters
TA type inheriting from EigenBase or a var_value with inner type inheriting from EigenBase.
LA type inheriting from EigenBase or a var_value with inner type inheriting from EigenBase.
Parameters
[in]xunconstrained input
[in]lblower bound on output
Returns
lower-bound constrained value corresponding to inputs

Definition at line 37 of file lb_constrain.hpp.