1#ifndef STAN_MATH_PRIM_FUN_STEP_HPP
2#define STAN_MATH_PRIM_FUN_STEP_HPP
30template <
typename T, require_stan_scalar_t<T>* =
nullptr>
32 return y < 0.0 ? 0 : 1;
47 static inline auto fun(
const T& y) {
60template <
typename T, require_container_t<T>* =
nullptr>
61inline auto step(
const T& x) {
T step(const T &y)
The step, or Heaviside, function.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Base template class for vectorization of unary scalar functions defined by a template class F to a sc...
static auto fun(const T &y)
Return zero if the value is less than zero and one otherwise.
Structure to wrap step() so it can be vectorized.