| Stan Math Library 2.12.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_REV_MAT_VECTORIZE_APPLY_SCALAR_UNARY_HPP
2 #define STAN_MATH_REV_MAT_VECTORIZE_APPLY_SCALAR_UNARY_HPP
3
4 #include <stan/math/prim/mat/vectorize/apply_scalar_unary.hpp>
5 #include <stan/math/rev/core/var.hpp>
6
7 namespace stan {
8 namespace math {
9
18 template <typename F>
19 struct apply_scalar_unary<F, var> {
23 typedef var return_t;
24
31 static inline return_t apply(const var& x) {
32 return F::fun(x);
33 }
34 };
35
36 }
37 }
38 #endif
stan
Definition: log_sum_exp.hpp:8
stan::math::apply_scalar_unary< F, var >::return_t
var return_t
Function return type, which is var.
Definition: apply_scalar_unary.hpp:23
stan::math::var
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:30
var.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:35
apply_scalar_unary.hpp
stan::math::apply_scalar_unary< F, var >::apply
static return_t apply(const var &x)
Apply the function specified by F to the specified argument.
Definition: apply_scalar_unary.hpp:31

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