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

◆ check_nonzero_size()

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

Check if the specified matrix/vector is of non-zero size.

Throws a std:invalid_argument otherwise. The message will indicate that the variable name "has size 0".

Template Parameters
T_yType of container
Parameters
functionFunction name (for error messages)
nameVariable name (for error messages)
yContainer to test. This will accept matrices and vectors
Exceptions
<code>std::invalid_argument</code>if the specified matrix/vector has zero size

Definition at line 22 of file check_nonzero_size.hpp.