Automatic Differentiation
 
Loading...
Searching...
No Matches
apply_scalar_unary.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_REV_FUNCTOR_APPLY_SCALAR_UNARY_HPP
2#define STAN_MATH_REV_FUNCTOR_APPLY_SCALAR_UNARY_HPP
3
6
7namespace stan {
8namespace math {
9
18template <typename F>
23 using return_t = var;
24
31 static inline return_t apply(const var& x) { return F::fun(x); }
32};
33
34template <typename F, typename T>
40
47 static inline return_t apply(const T& x) { return F::fun(x); }
48};
49
50} // namespace math
51} // namespace stan
52#endif
require_t< is_var_matrix< std::decay_t< T > > > require_var_matrix_t
Require type satisfies is_var_matrix.
var_value< double > var
Definition var.hpp:1187
typename plain_type< T >::type plain_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
static return_t apply(const T &x)
Apply the function specified by F to the specified argument.
plain_type_t< T > return_t
Function return type, which is a var_value with plain value type.
static return_t apply(const var &x)
Apply the function specified by F to the specified argument.
Base template class for vectorization of unary scalar functions defined by a template class F to a sc...