Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ check_nonnegative()

template<typename T_y >
void stan::math::check_nonnegative ( const char *  function,
const char *  name,
const T_y &  y 
)
inline

Check if y is non-negative.

This function is vectorized and will check each element of y.

Template Parameters
T_yType of y
Parameters
functionFunction name (for error messages)
nameVariable name (for error messages)
yVariable to check
Exceptions
<code>domain_error</code>if y is negative or if any element of y is NaN.

Definition at line 24 of file check_nonnegative.hpp.