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

◆ ub_constrain() [10/14]

template<typename T , typename U , require_not_std_vector_t< U > * = nullptr>
auto stan::math::ub_constrain ( const std::vector< T > &  x,
const U &  ub,
return_type_t< T, U > &  lp 
)
inline

Specialization of ub_constrain to apply a scalar upper bound elementwise to each input element.

Template Parameters
TA Any type with a Scalar scalar_type.
UScalar.
Parameters
[in]xunconstrained input
[in]ubupper bound on output
[in,out]lpreference to log probability to increment
Returns
lower-bound constrained value corresponding to inputs

Definition at line 183 of file ub_constrain.hpp.