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

◆ lb_constrain() [2/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 ( const T &  x,
const L &  lb,
return_type_t< T, L > &  lp 
)
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.

Return the lower-bounded value for the specified unconstrained input and specified lower bound, incrementing the specified reference with the log absolute Jacobian determinant of the transform.

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
[in,out]lpreference to log probability to increment
Returns
constrained matrix
Template Parameters
TScalar.
LScalar.
Parameters
[in]xunconstrained input
[in]lblower bound on output
[in,out]lpreference to log probability to increment
Returns
lower-bound constrained value corresponding to inputs
Template Parameters
TA type inheriting from EigenBase.
LA type inheriting from EigenBase.
Parameters
[in]xunconstrained input
[in]lblower bound on output
[in,out]lpreference to log probability to increment
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
[in,out]lpreference to log probability to increment
Returns
lower-bound constrained value corresponding to inputs

Definition at line 60 of file lb_constrain.hpp.