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

◆ lb_constrain() [12/14]

template<bool Jacobian, typename T , typename L >
auto stan::math::lb_constrain ( const T &  x,
const L &  lb,
return_type_t< T, L > &  lp 
)
inline

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

If the Jacobian parameter is true, the log density accumulator is incremented with the log absolute Jacobian determinant of the transform. All of the transforms are specified with their Jacobians in the Stan Reference Manual chapter Constraint Transforms.

Template Parameters
Jacobianif true, increment log density accumulator with log absolute Jacobian determinant of constraining transform
TA type inheriting from Eigen::EigenBase, a var_value with inner type inheriting from Eigen::EigenBase, a standard vector, or a scalar
LA type inheriting from Eigen::EigenBase, a var_value with inner type inheriting from Eigen::EigenBase, a standard vector, or a scalar
Parameters
[in]xunconstrained input
[in]lblower bound on output
[in,out]lplog density accumulator
Returns
lower-bound constrained value corresponding to inputs

Definition at line 243 of file lb_constrain.hpp.