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

◆ head() [1/3]

template<typename T_x , typename = require_nonscalar_prim_or_rev_kernel_expression_t<T_x>>
auto stan::math::head ( T_x &&  x,
size_t  n 
)
inline

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

Template Parameters
T_xtype of input kernel generator expression.
Parameters
xinput kernel generator expression.
nSize of return.
Returns
The first n elements of v.
Exceptions
std::out_of_rangeif n is out of range.

Definition at line 24 of file head.hpp.