Stan Math Library  2.20.0
reverse mode automatic differentiation
Public Member Functions | List of all members
stan::math::internal::index_comparator< ascending, C > Class Template Reference

#include <sort_indices.hpp>

Public Member Functions

 index_comparator (const C &xs)
 Construct an index comparator holding a reference to the specified container. More...
 
bool operator() (int i, int j) const
 Return true if the value at the first index is sorted in front of the value at the second index; this will depend on the template parameter ascending. More...
 

Detailed Description

template<bool ascending, typename C>
class stan::math::internal::index_comparator< ascending, C >

Definition at line 21 of file sort_indices.hpp.

Constructor & Destructor Documentation

◆ index_comparator()

template<bool ascending, typename C>
stan::math::internal::index_comparator< ascending, C >::index_comparator ( const C &  xs)
inlineexplicit

Construct an index comparator holding a reference to the specified container.

Parameters
xsContainer

Definition at line 31 of file sort_indices.hpp.

Member Function Documentation

◆ operator()()

template<bool ascending, typename C>
bool stan::math::internal::index_comparator< ascending, C >::operator() ( int  i,
int  j 
) const
inline

Return true if the value at the first index is sorted in front of the value at the second index; this will depend on the template parameter ascending.

Parameters
iIndex of first value for comparison
jIndex of second value for comparison

Definition at line 41 of file sort_indices.hpp.


The documentation for this class was generated from the following file:

     [ Stan Home Page ] © 2011–2018, Stan Development Team.