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

◆ tail() [2/3]

template<typename T , require_vector_t< T > * = nullptr>
auto stan::math::tail ( const T &  v,
size_t  n 
)
inline

Return the specified number of elements as a vector or row vector (same as input) from the back of the specified vector or row vector.

Template Parameters
Ttype of the vector
Parameters
vVector input.
nSize of return.
Returns
The last n elements of v.
Exceptions
std::out_of_rangeif n is out of range.

Definition at line 23 of file tail.hpp.