1 #ifndef STAN_MATH_PRIM_SCAL_FUN_UB_CONSTRAIN_HPP 2 #define STAN_MATH_PRIM_SCAL_FUN_UB_CONSTRAIN_HPP 5 #include <boost/math/tools/promotion.hpp> 32 template <
typename T,
typename U>
33 inline typename boost::math::tools::promote_args<T, U>::type
ub_constrain(
34 const T& x,
const U& ub) {
64 template <
typename T,
typename U>
65 inline typename boost::math::tools::promote_args<T, U>::type
ub_constrain(
66 const T& x,
const U& ub, T& lp) {
T identity_constrain(const T &x)
Returns the result of applying the identity constraint transform to the input.
boost::math::tools::promote_args< T, U >::type ub_constrain(const T &x, const U &ub)
Return the upper-bounded value for the specified unconstrained scalar and upper bound.
fvar< T > exp(const fvar< T > &x)
const double INFTY
Positive infinity.