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
-
- Parameters
-
| function | Function name (for error messages) |
| name | Variable name (for error messages) |
| y | matrix to test |
| i | column 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.