Stan Math Library  2.20.0
reverse mode automatic differentiation
value_of.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_VALUE_OF_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_VALUE_OF_HPP
3 
5 namespace stan {
6 namespace math {
7 
23 template <typename T>
24 inline double value_of(const T x) {
25  return static_cast<double>(x);
26 }
27 
39 template <>
40 inline double value_of<double>(double x) {
41  return x;
42 }
43 
55 inline int value_of(int x) { return x; }
56 
57 } // namespace math
58 } // namespace stan
59 #endif
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:17
double value_of< double >(double x)
Return the specified argument.
Definition: value_of.hpp:40

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