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

◆ check_std_vector_index()

template<typename T >
void stan::math::check_std_vector_index ( const char *  function,
const char *  name,
const std::vector< T > &  y,
int  i 
)
inline

Check if the specified index is valid in std vector This check is 1-indexed by default.

This behavior can be changed by setting stan::error_index::value.

Template Parameters
TScalar type
Parameters
functionFunction name (for error messages)
nameVariable name (for error messages)
ystd::vector to test
iIndex
Exceptions
<code>std::out_of_range</code>if the index is out of range.

Definition at line 26 of file check_std_vector_index.hpp.