#include <SortableArray.h>
Public Methods | |
SortableArray (int s=10, float rsf=2.0) | |
~SortableArray (void) | |
int | num (void) |
largest number of elements that have been accessed. More... | |
T & | operator[] (int N) |
[] operator version of the item() routine. More... | |
int | append (const T &val) |
add a new element to the end of the array. Return index of new item. More... | |
T & | item (int N) |
return the nth item; assume N is >= 0. More... | |
void | remove (int m=-1, int n=-1) |
remove the Mth ... Nth items: move all items lower in the array up to fill the empty slots. If both arguments are < 0, removes ALL items. If the second argument is < 0, just removes item m. More... | |
void | swap (int i, int j) |
auxilliary function for qsort. More... | |
void | qsort (int left, int right) |
sorts elements based on a specialied field. To change the sort, change the field which is used as a basis for comparison. The '>' and '<' symbols are overloaded. More... | |
void | isort () |
This is an internal sort. More... |
Definition at line 33 of file SortableArray.h.
|
Definition at line 50 of file SortableArray.h. |
|
Definition at line 62 of file SortableArray.h. |
|
add a new element to the end of the array. Return index of new item.
Definition at line 82 of file SortableArray.h. |
|
This is an internal sort.
Definition at line 170 of file SortableArray.h. |
|
return the nth item; assume N is >= 0.
Definition at line 88 of file SortableArray.h. Referenced by SortableArray< DepthSortObject >::append, and SortableArray< DepthSortObject >::operator[]. |
|
largest number of elements that have been accessed.
Definition at line 72 of file SortableArray.h. |
|
[] operator version of the item() routine.
Definition at line 79 of file SortableArray.h. |
|
sorts elements based on a specialied field. To change the sort, change the field which is used as a basis for comparison. The '>' and '<' symbols are overloaded.
Definition at line 154 of file SortableArray.h. Referenced by SortableArray< DepthSortObject >::qsort. |
|
remove the Mth ... Nth items: move all items lower in the array up to fill the empty slots. If both arguments are < 0, removes ALL items. If the second argument is < 0, just removes item m.
Definition at line 124 of file SortableArray.h. |
|
auxilliary function for qsort.
Definition at line 143 of file SortableArray.h. Referenced by SortableArray< DepthSortObject >::qsort. |