| Stan Math Library 2.12.0 reverse mode automatic differentiation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

exp.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_EXP_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_EXP_HPP
3
4 #include <stan/math/prim/mat/vectorize/apply_scalar_unary.hpp>
5 #include <stan/math/prim/scal/fun/exp.hpp>
6 #include <cmath>
7
8 namespace stan {
9 namespace math {
10
15 struct exp_fun {
23 template <typename T>
24 static inline T fun(const T& x) {
25 using std::exp;
26 return exp(x);
27 }
28 };
29
39 template <typename T>
40 inline typename apply_scalar_unary<exp_fun, T>::return_t
41 exp(const T& x) {
42 return apply_scalar_unary<exp_fun, T>::apply(x);
43 }
44
45 }
46 }
47
48 #endif
stan::math::exp_fun::fun
static T fun(const T &x)
Return the exponential of the specified scalar argument.
Definition: exp.hpp:24
stan
Definition: log_sum_exp.hpp:8
stan::math::exp
var exp(const var &a)
Return the exponentiation of the specified variable (cmath).
Definition: exp.hpp:44
stan::math::exp
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
stan::math::exp_fun
Structure to wrap exp() so that it can be vectorized.
Definition: exp.hpp:15
exp.hpp
stan::math::apply_scalar_unary::apply
static return_t apply(const T &x)
Return the result of applying the function defined by the template parameter F to the specified matri...
Definition: apply_scalar_unary.hpp:57
apply_scalar_unary.hpp

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