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

◆ sort_indices()

template<bool ascending, typename C >
std::vector< int > stan::math::sort_indices ( const C &  xs)

Return an integer array of indices of the specified container sorting the values in ascending or descending order based on the value of the first template parameter.

Template Parameters
ascendingtrue if sort is in ascending order
Ctype of container
Parameters
xsContainer to sort
Returns
sorted version of container

Definition at line 64 of file sort_indices.hpp.