Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
value_of.hpp
Go to the documentation of this file.
1 #ifndef STAN__MATH__FUNCTIONS__VALUE_OF_HPP
2 #define STAN__MATH__FUNCTIONS__VALUE_OF_HPP
3 
4 namespace stan {
5 
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>(const double x) {
41  return x;
42  }
43 
44  }
45 }
46 
47 #endif
double value_of(const T x)
Return the value of the specified scalar argument converted to a double value.
Definition: value_of.hpp:24
double value_of< double >(const double x)
Return the specified argument.
Definition: value_of.hpp:40

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