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

◆ head() [3/3]

template<typename T >
std::vector< T > stan::math::head ( const std::vector< T > &  sv,
size_t  n 
)

Return the specified number of elements as a standard vector from the front of the specified standard vector.

Template Parameters
Ttype of elements in the vector
Parameters
svStandard vector.
nSize of return.
Returns
The first n elements of sv.
Exceptions
std::out_of_rangeif n is out of range.

Definition at line 40 of file head.hpp.