Stan Math Library: stan/math/fwd/mat/vectorize/apply_scalar_unary.hpp Source File

| Stan Math Library 2.10.0 reverse mode automatic differentiation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

apply_scalar_unary.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_FWD_MAT_VECTORIZE_APPLY_UNARY_SCALAR_HPP
2 #define STAN_MATH_FWD_MAT_VECTORIZE_APPLY_UNARY_SCALAR_HPP
3
4 #include <stan/math/prim/mat/vectorize/apply_scalar_unary.hpp>
5 #include <stan/math/fwd/core/fvar.hpp>
6
7 namespace stan {
8
9 namespace math {
10
21 template <typename F, typename T>
22 struct apply_scalar_unary<F, stan::math::fvar<T> > {
27 typedef stan::math::fvar<T> return_t;
28
35 static inline return_t apply(const stan::math::fvar<T>& x) {
36 return F::fun(x);
37 }
38 };
39
40 }
41 }
42 #endif
stan
Definition: log_sum_exp.hpp:8
stan::math::apply_scalar_unary< F, stan::math::fvar< T > >::return_t
stan::math::fvar< T > return_t
Function return type, which is same as the argument type for the function, fvar.
Definition: apply_scalar_unary.hpp:27
stan::math::apply_scalar_unary< F, stan::math::fvar< T > >::apply
static return_t apply(const stan::math::fvar< T > &x)
Apply the function specified by F to the specified argument.
Definition: apply_scalar_unary.hpp:35
fvar.hpp
stan::math::apply_scalar_unary
Base template class for vectorization of unary scalar functions defined by a template class F to a sc...
Definition: apply_scalar_unary.hpp:36
apply_scalar_unary.hpp
stan::math::fvar
Definition: fvar.hpp:13

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