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

◆ segment() [1/3]

template<typename T_x , require_nonscalar_prim_or_rev_kernel_expression_t< T_x > * = nullptr>
auto stan::math::segment ( T_x &&  x,
size_t  i,
size_t  n 
)
inline

Return the specified number of elements as a row/column vector starting from the specified element - 1 of the specified row/column vector.

Template Parameters
T_xtype of input kernel generator expression x
Parameters
xinput kernel generator expression.
iStarting row/column + 1.
nNumber of rows/columns in segment.
Exceptions
std::out_of_rangeif either index is out of range.

Definition at line 24 of file segment.hpp.