Automatic Differentiation
 
Loading...
Searching...
No Matches
sort_indices.hpp File Reference
#include <stan/math/prim/meta.hpp>
#include <stan/math/prim/fun/Eigen.hpp>
#include <stan/math/prim/fun/to_ref.hpp>
#include <algorithm>
#include <vector>

Go to the source code of this file.

Classes

class  stan::math::internal::index_comparator< ascending, C >
 

Namespaces

namespace  stan
 The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation from C or the boost::math::lgamma implementation.
 
namespace  stan::math
 Matrices and templated mathematical functions.
 
namespace  stan::math::internal
 A comparator that works for any container type that has the brackets operator.
 

Functions

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.