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

◆ get_base1() [9/11]

template<typename EigMat , require_eigen_t< EigMat > * = nullptr, require_not_eigen_vector_t< EigMat > * = nullptr>
Eigen::Matrix< value_type_t< EigMat >, 1, Eigen::Dynamic > stan::math::get_base1 ( const EigMat &  x,
size_t  m,
const char *  error_msg,
size_t  idx 
)
inline

Return a copy of the row of the specified matrix at the specified base-one row index.

If the index is out of range, throw a std::out_of_range exception with the specified error message and index indicated.

Warning: Because a copy is involved, it is inefficient to access element of matrices by first using this method to get a row then using a second call to get the value at a specified column.

Template Parameters
EigMattype of the matrix
Parameters
xMatrix from which to get a row
mIndex into matrix plus 1.
error_msgError message if the index is out of range.
idxNested index level to report in error message if the index is out of range.
Returns
Row of matrix at i - 1.
Exceptions
std::out_of_rangeif idx is out of range.

Definition at line 253 of file get_base1.hpp.