Stan
1.3
probability, sampling & optimization
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerator
Friends
Macros
Pages
src
stan
math
functions
if_else.hpp
Go to the documentation of this file.
1
#ifndef __STAN__MATH__FUNCTIONS__IF_ELSE_HPP__
2
#define __STAN__MATH__FUNCTIONS__IF_ELSE_HPP__
3
4
#include <boost/math/tools/promotion.hpp>
5
6
namespace
stan {
7
namespace
math {
8
23
template
<
typename
T_true,
typename
T_false>
24
inline
typename
boost::math::tools::promote_args<T_true,T_false>::type
25
if_else
(
const
bool
c,
const
T_true y_true,
const
T_false y_false) {
26
return
c ? y_true : y_false;
27
}
28
29
}
30
}
31
32
#endif
[
Stan Home Page
]
© 2011–2013, Stan Development Team.