Open CASCADE Technology  6.9.0
Static Public Member Functions

NCollection_QuickSort< TheCollType, TheItemType > Class Template Reference

#include <NCollection_QuickSort.hxx>

Static Public Member Functions

static void Perform (TheCollType &theEnumColl, const NCollection_Comparator< TheItemType > &theComparator, const Standard_Integer theLower, const Standard_Integer theUpper)
 Main entry call to perform sorting. More...
 

Detailed Description

template<class TheCollType, class TheItemType>
class NCollection_QuickSort< TheCollType, TheItemType >

Perform sorting of enumerable collection with QuickSort algorithm. Enumerable collection should provide the random access to its values by index number with methods Value(theId) and ChangeValue(theId). Currently it supposed to be used with NCollection_Sequence and NCollection_Vector.

Usage sample: // input sequence NCollection_Sequence<Standard_Real> aSequence; // perform sorting for the whole sequence. NCollection_QuickSort<NCollection_Sequence<Standard_Real>, Standard_Real> ::Perform (aSequence, NCollection_Comparator<Standard_Real>(), 1, aSequence.Size());

Member Function Documentation

template<class TheCollType , class TheItemType >
static void NCollection_QuickSort< TheCollType, TheItemType >::Perform ( TheCollType &  theEnumColl,
const NCollection_Comparator< TheItemType > &  theComparator,
const Standard_Integer  theLower,
const Standard_Integer  theUpper 
)
inlinestatic

Main entry call to perform sorting.


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