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

◆ check_positive() [1/2]

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

Check if y is positive.

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 zero or if any element of y is NaN

Definition at line 27 of file check_positive.hpp.