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

◆ ub_constrain() [8/14]

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

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

Template Parameters
TA type inheriting from EigenBase.
UScalar.
Parameters
[in]xunconstrained input
[in]ubupper bound on output
[in,out]lpreference to log probability to increment
Returns
upper-bound constrained value corresponding to inputs

Definition at line 108 of file ub_constrain.hpp.