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

◆ check_range() [3/3]

void stan::math::check_range ( const char *  function,
const char *  name,
int  max,
int  index 
)
inline

Check if specified index is within range.

This check is 1-indexed by default. This behavior can be changed by setting stan::error_index::value.

Parameters
functionFunction name (for error messages)
nameVariable name (for error messages)
maxMaximum size of the variable
indexIndex to check
Exceptions
<code>std::out_of_range</code>if the index is not in range

Definition at line 68 of file check_range.hpp.