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

◆ check_column_index()

template<typename T_y , require_any_t< is_matrix< T_y >, is_prim_or_rev_kernel_expression< T_y > > * = nullptr>
void stan::math::check_column_index ( const char *  function,
const char *  name,
const T_y &  y,
size_t  i 
)
inline

Check if the specified index is a valid column of the matrix.

By default this is a 1-indexed check (as opposed to 0-indexed). Behavior can be changed by setting stan::error_index::value. This function will throw an std::out_of_range exception if the index is out of bounds.

Template Parameters
T_yType of matrix
Parameters
functionFunction name (for error messages)
nameVariable name (for error messages)
ymatrix to test
icolumn index to check
Exceptions
<code>std::out_of_range</code>if index is an invalid column

Definition at line 30 of file check_column_index.hpp.