Navigation

Operators and Keywords

Function List:

C++ API

octave_sort< T > Class Template Reference

#include <oct-sort.h>

Collaboration diagram for octave_sort< T >:

List of all members.

Classes

struct  MergeState
struct  s_slice

Public Types

typedef bool(* compare_fcn_type )(typename ref_param< T >::type, typename ref_param< T >::type)

Public Member Functions

 octave_sort (void)
 octave_sort (compare_fcn_type)
 ~octave_sort (void)
void set_compare (compare_fcn_type comp)
void set_compare (sortmode mode)
void sort (T *data, octave_idx_type nel)
void sort (T *data, octave_idx_type *idx, octave_idx_type nel)
bool is_sorted (const T *data, octave_idx_type nel)
void sort_rows (const T *data, octave_idx_type *idx, octave_idx_type rows, octave_idx_type cols)
bool is_sorted_rows (const T *data, octave_idx_type rows, octave_idx_type cols)
octave_idx_type lookup (const T *data, octave_idx_type nel, const T &value)
void lookup (const T *data, octave_idx_type nel, const T *values, octave_idx_type nvalues, octave_idx_type *idx)
void lookup_sorted (const T *data, octave_idx_type nel, const T *values, octave_idx_type nvalues, octave_idx_type *idx, bool rev=false)
void nth_element (T *data, octave_idx_type nel, octave_idx_type lo, octave_idx_type up=-1)
template<>
void sort (bool *data, octave_idx_type nel, std::less< bool >)
template<>
void sort (bool *data, octave_idx_type nel, std::greater< bool >)
template<>
void sort (bool *data, octave_idx_type *idx, octave_idx_type nel, std::less< bool >)
template<>
void sort (bool *data, octave_idx_type *idx, octave_idx_type nel, std::greater< bool >)

Static Public Member Functions

static bool ascending_compare (typename ref_param< T >::type, typename ref_param< T >::type)
static bool descending_compare (typename ref_param< T >::type, typename ref_param< T >::type)

template<class T>
class octave_sort< T >


Member Typedef Documentation

template<class T >
typedef bool(* octave_sort< T >::compare_fcn_type)(typename ref_param< T >::type, typename ref_param< T >::type)

Constructor & Destructor Documentation

template<class T >
octave_sort< T >::octave_sort ( void   ) 
template<class T >
octave_sort< T >::octave_sort ( compare_fcn_type  comp  ) 
template<class T >
octave_sort< T >::~octave_sort ( void   ) 

Member Function Documentation

template<class T >
bool octave_sort< T >::ascending_compare ( typename ref_param< T >::type  x,
typename ref_param< T >::type  y 
) [static]
template<class T >
bool octave_sort< T >::descending_compare ( typename ref_param< T >::type  x,
typename ref_param< T >::type  y 
) [static]
template<class T >
bool octave_sort< T >::is_sorted ( const T *  data,
octave_idx_type  nel 
)
template<class T >
bool octave_sort< T >::is_sorted_rows ( const T *  data,
octave_idx_type  rows,
octave_idx_type  cols 
)
template<class T >
octave_idx_type octave_sort< T >::lookup ( const T *  data,
octave_idx_type  nel,
const T &  value 
)
template<class T >
void octave_sort< T >::lookup ( const T *  data,
octave_idx_type  nel,
const T *  values,
octave_idx_type  nvalues,
octave_idx_type idx 
)
template<class T >
void octave_sort< T >::lookup_sorted ( const T *  data,
octave_idx_type  nel,
const T *  values,
octave_idx_type  nvalues,
octave_idx_type idx,
bool  rev = false 
)
template<class T >
void octave_sort< T >::nth_element ( T *  data,
octave_idx_type  nel,
octave_idx_type  lo,
octave_idx_type  up = -1 
)
template<class T >
void octave_sort< T >::set_compare ( compare_fcn_type  comp  )  [inline]
template<class T >
void octave_sort< T >::set_compare ( sortmode  mode  ) 
template<class T >
void octave_sort< T >::sort ( T *  data,
octave_idx_type idx,
octave_idx_type  nel 
)
template<class T >
void octave_sort< T >::sort ( T *  data,
octave_idx_type  nel 
)
template<>
void octave_sort< bool >::sort ( bool data,
octave_idx_type idx,
octave_idx_type  nel,
std::less< bool  
)
template<>
void octave_sort< bool >::sort ( bool data,
octave_idx_type  nel,
std::less< bool  
)
template<>
void octave_sort< bool >::sort ( bool data,
octave_idx_type idx,
octave_idx_type  nel,
std::greater< bool  
)
template<>
void octave_sort< bool >::sort ( bool data,
octave_idx_type  nel,
std::greater< bool  
)
template<class T >
void octave_sort< T >::sort_rows ( const T *  data,
octave_idx_type idx,
octave_idx_type  rows,
octave_idx_type  cols 
)

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines