#include <OgreRadixSort.h>
Public Types | |
typedef TContainer::iterator | ContainerIter |
Public Member Functions | |
RadixSort () | |
~RadixSort () | |
template<class TFunction> void | sort (TContainer &container, TFunction func) |
Main sort function. | |
Protected Member Functions | |
void | sortPass (int byteIndex) |
template<typename T> void | finalPass (int byteIndex, T val) |
void | finalPass (int byteIndex, int val) |
void | finalPass (int byteIndex, float val) |
unsigned char | getByte (int byteIndex, TCompValueType val) |
Protected Attributes | |
int | mCounters [4][256] |
Alpha-pass counters of values (histogram) 4 of them so we can radix sort a maximum of a 32bit value. | |
int | mOffsets [256] |
Beta-pass offsets. | |
int | mSortSize |
Sort area size. | |
int | mNumPasses |
Number of passes for this type. | |
std::vector< SortEntry > | mSortArea1 |
Temp sort storage. | |
std::vector< SortEntry > | mSortArea2 |
std::vector< SortEntry > * | mSrc |
std::vector< SortEntry > * | mDest |
TContainer | mTmpContainer |
Then, you need to declare a RadixSort class which names the container type, the value type in the container, and the type of the value you want to sort by. You can then call the sort function. E.g.struct BibbleSortFunctor { float operator()(const Bibble& val) const { return val.getDoobrie(); } }
You should try to reuse RadixSort instances, since repeated allocation of the internal storage is then avoided.RadixSort<BibbleList, Bibble, float> radixSorter; BibbleSortFunctor functor; radixSorter.sort(myBibbleList, functor);
Definition at line 79 of file OgreRadixSort.h.
|
Definition at line 82 of file OgreRadixSort.h. Referenced by Ogre::RadixSort< TContainer, TContainerValueType, TCompValueType >::SortEntry::SortEntry(). |
|
Definition at line 227 of file OgreRadixSort.h. |
|
Definition at line 228 of file OgreRadixSort.h. |
|
Definition at line 170 of file OgreRadixSort.h. |
|
Definition at line 137 of file OgreRadixSort.h. |
|
Definition at line 130 of file OgreRadixSort.h. Referenced by Ogre::RadixSort< RenderablePassList, RenderablePass, uint32 >::sort(). |
|
|
Main sort function.
Definition at line 236 of file OgreRadixSort.h. |
|
Definition at line 111 of file OgreRadixSort.h. Referenced by Ogre::RadixSort< RenderablePassList, RenderablePass, uint32 >::finalPass(), and Ogre::RadixSort< RenderablePassList, RenderablePass, uint32 >::sort(). |
|
Alpha-pass counters of values (histogram) 4 of them so we can radix sort a maximum of a 32bit value.
Definition at line 86 of file OgreRadixSort.h. |
|
Definition at line 107 of file OgreRadixSort.h. |
|
Number of passes for this type.
Definition at line 92 of file OgreRadixSort.h. |
|
Beta-pass offsets.
Definition at line 88 of file OgreRadixSort.h. |
|
Temp sort storage.
Definition at line 104 of file OgreRadixSort.h. |
|
Definition at line 105 of file OgreRadixSort.h. |
|
Sort area size.
Definition at line 90 of file OgreRadixSort.h. |
|
Definition at line 106 of file OgreRadixSort.h. |
|
Definition at line 108 of file OgreRadixSort.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:41:54 2006