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

◆ ub_constrain() [7/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 
)
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
Returns
upper-bound constrained value corresponding to inputs
Template Parameters
TA type inheriting from EigenBase or a var_value with inner type inheriting from EigenBase.
UScalar.
Parameters
[in]xunconstrained input
[in]ubupper bound on output
Returns
upper-bound constrained value corresponding to inputs

Definition at line 90 of file ub_constrain.hpp.