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

◆ check_consistent_size()

template<typename T >
void stan::math::check_consistent_size ( const char *  function,
const char *  name,
const T &  x,
size_t  expected_size 
)
inline

Check if x is consistent with size expected_size.

x is consistent with size expected_size if x is a vector of size expected_size, or a non vector.

Template Parameters
Ttype of value
Parameters
functionfunction name (for error messages)
namevariable name (for error messages)
xvariable to check for consistent size
expected_sizeexpected size if x is a vector
Exceptions
`invalid_argument`if the size is inconsistent

Definition at line 25 of file check_consistent_size.hpp.