seal::BubbleSort< T > Class Template Reference

#include <sort.h>

Inheritance diagram for seal::BubbleSort< T >:

seal::SortingAlgorithm< T >

List of all members.

Public Member Functions

 BubbleSort (void)
virtual ~BubbleSort ()
virtual void operator() (RandomAccess< T > &array, int from, int to, SortOrder order=ASCENDING)
virtual void sort (RandomAccess< T > &array, int from, int to, SortOrder order=ASCENDING)


Detailed Description

template<typename T>
class seal::BubbleSort< T >

This class encapsulates the bubble sort algorithm. Elements of any data structure which implements the RandomAccess interface (that is, elements of any data structure which is derived from the abstract base class RandomAccess) can be sorted using this algorithm class.

Constructor & Destructor Documentation

template<typename T>
seal::BubbleSort< T >::BubbleSort ( void   )  [inline]

Default constructor.

template<typename T>
virtual seal::BubbleSort< T >::~BubbleSort (  )  [inline, virtual]

Virtual destructor.


Member Function Documentation

template<typename T>
void seal::BubbleSort< T >::operator() ( RandomAccess< T > &  array,
int  from,
int  to,
SortOrder  order = ASCENDING 
) [inline, virtual]

The operator which performs the actual sorting of the elements using the bubble sort algorithm.

Parameters:
array The data structure whose elements will be sorted.
from The elements starting from this index in the data structure will be sorted in the order requested.
to The elements upto this index in the data structure will be sorted in the order requested.
order The order in which the elements will be sorted.

Reimplemented from seal::SortingAlgorithm< T >.

template<typename T>
virtual void seal::BubbleSort< T >::sort ( RandomAccess< T > &  array,
int  from,
int  to,
SortOrder  order = ASCENDING 
) [inline, virtual]

The function which performs the actual sorting of the elements using the bubble sort algorithm.

Parameters:
array The data structure whose elements will be sorted.
from The elements starting from this index in the data structure will be sorted in the order requested.
to The elements upto this index in the data structure will be sorted in the order requested.
order The order in which the elements will be sorted.

Implements seal::SortingAlgorithm< T >.


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

Generated on Sat May 16 21:35:21 2009 for SEAL by  doxygen 1.5.5