Stan Math Library  2.9.0
reverse mode automatic differentiation
as_bool.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_AS_BOOL_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_AS_BOOL_HPP
3 
4 namespace stan {
5  namespace math {
6 
13  template <typename T>
14  inline bool as_bool(const T x) {
15  return x != 0;
16  }
17 
18  }
19 }
20 
21 #endif
bool as_bool(const T x)
Return 1 if the argument is unequal to zero and 0 otherwise.
Definition: as_bool.hpp:14

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