Stan Math Library
2.20.0
reverse mode automatic differentiation
stan
math
prim
scal
fun
step.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_PRIM_SCAL_FUN_STEP_HPP
2
#define STAN_MATH_PRIM_SCAL_FUN_STEP_HPP
3
4
#include <
stan/math/prim/meta.hpp
>
5
namespace
stan
{
6
namespace
math {
7
28
template
<
typename
T>
29
inline
double
step
(
const
T& y) {
30
return
y < 0.0 ? 0 : 1;
31
}
32
33
}
// namespace math
34
}
// namespace stan
35
36
#endif
stan
Definition:
log_sum_exp.hpp:8
meta.hpp
stan::math::step
double step(const T &y)
The step, or Heaviside, function.
Definition:
step.hpp:29
[
Stan Home Page
]
© 2011–2018, Stan Development Team.