Stan Math Library  2.15.0
reverse mode automatic differentiation
log.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_LOG_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_LOG_HPP
3 
6 #include <cmath>
7 
8 namespace stan {
9  namespace math {
10 
14  struct log_fun {
22  template <typename T>
23  static inline T fun(const T& x) {
24  using std::log;
25  return log(x);
26  }
27  };
28 
38  template <typename T>
40  log(const T& x) {
42  }
43 
44  }
45 }
46 #endif
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:14
static T fun(const T &x)
Return natural log of specified argument.
Definition: log.hpp:23
Structure to wrap log() so that it can be vectorized.
Definition: log.hpp:14
Eigen::Matrix< scalar_t, T::RowsAtCompileTime, T::ColsAtCompileTime > return_t
Return type for applying the function elementwise to a matrix expression template of type T...
var log(const var &a)
Return the natural log of the specified variable (cmath).
Definition: log.hpp:50
static return_t apply(const T &x)
Return the result of applying the function defined by the template parameter F to the specified matri...

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