| Stan Math Library 2.6.3 probability, sampling & optimization

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
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
stan::math::as_bool
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.