All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
positive_constrain.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_PRIM_SCAL_FUN_POSITIVE_CONSTRAIN_HPP
#define STAN_MATH_PRIM_SCAL_FUN_POSITIVE_CONSTRAIN_HPP
#include <cmath>
namespace stan {
namespace math {
template <typename T>
inline
T positive_constrain(const T x) {
return exp(x);
}
template <typename T>
inline
T positive_constrain(const T x, T& lp) {
lp += x;
return exp(x);
}
}
}
#endif
stan::math::positive_constrain
T positive_constrain(const T x)
Return the positive value for the specified unconstrained input.
Definition: positive_constrain.hpp:22
stan::math::exp
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10

[ Stan Home Page ] © 2011–2015, Stan Development Team.