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

◆ lb_constrain() [1/14]

template<typename T , typename L , require_all_kernel_expressions_and_none_scalar_t< T > * = nullptr, require_all_kernel_expressions_t< L > * = nullptr>
auto stan::math::lb_constrain ( T &&  x,
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
Tkernel generator expression
Lkernel generator expression
Parameters
[in]xunconstrained input
[in]lblower bound
Returns
constrained matrix
Template Parameters
TA type inheriting from EigenBase.
LA type inheriting from EigenBase.
Parameters
[in]xunconstrained input
[in]lblower bound on output
Returns
lower-bound constrained value corresponding to inputs

Definition at line 32 of file lb_constrain.hpp.