
Trove () 

Creates an empty trove which will grow arithmetically with an increment size of 8. 

Trove (float64 multiplier) 

Creates an empty trove which grows geometrically rather than arithmetically. 

Trove (const Trove &otha) 

Constructs a trove identical to otha. 

Trove (const ELEMType *array, int64 count) 

Constructs a trove from a C array array of length count. 
virtual ObRetort 
Append (ARGType elem) 

Appends elem to the end of the trove. 
int64 
CompactNulls () 

returns number of NULLs removed, or 1 if not pointy 
int64 
Count () const 

Returns the number of elements in this trove. 
ObCrawl< ELEMType > 
Crawl () const 

Returns by value a Crawl that can iterate over this trove. 
void 
Empty () 

Removes all elements from the trove. 
ObRetort 
EnsureRoomFor (int64 num) 

Makes sure the capacity of the trove is at least num. 
virtual ObRetort 
ExpandUsingDefaultValTo (int64 num) 

Increases the Count() to num, filling in with default elements at the end, and returns OB_OK, if num is greater than the existing Count(). 
int64 
Find (ARGType elem) const 

Searches the trove for an element equal to elem, and returns its index, or 1 if not found. 
ObCrawl< ELEMType > * 
HeapyCrawl () const 

Returns by pointer a Crawl that can iterate over this trove. 
bool 
HoldingNullifiedElements () const 

Synonym for IsHoldingNullifiedElements(). 
virtual ObRetort 
Insert (ARGType elem, int64 ind) 

Inserts elem at index ind in the trove. 
bool 
IsHoldingNullifiedElements () const 

Returns true if Nullify() or NullifyNth() has been successfully called, without CompactNulls() having been subsequently called. 
ObRetort 
MoveNthTo (int64 from_ind, int64 to_ind) 

Moves the element at from_ind to be at to_ind instead. 
ObRetort 
MoveNthToBack (int64 ind) 

Moves the ind th element to the back of the trove. 
ObRetort 
MoveNthToFront (int64 ind) 

Moves the ind th element to the front of the trove. 
ObRetort 
MoveToBack (ARGType elem) 

Finds the first occurrence of elem and moves it to the back of the trove. 
ObRetort 
MoveToFront (ARGType elem) 

Finds the first occurrence of elem and moves it to the front of the trove. 
ACCESSType 
Nth (int64 ind) const 

Returns the ind th element of the trove, or a null value if ind is out of range. 
STOREDType 
NthObRef (int64 ind) const 

really for pointy things – won't work with objects... 
ObRetort 
Nullify (ARGType elem) 

Searches the trove for an element equal to elem, and sets it to null. 
ObRetort 
NullifyNth (int64 N) 

Sets the N th element to null, and returns OB_OK. 
ObRetort 
PopAft () 

Removes the last element of the trove, and returns OB_OK. 
void 
Quicksort (int(*cmp)(ARGType a, ARGType b), int64 left=0, int64 right=1) 

[quicksort](http://en.wikipedia.org/wiki/Quicksort) Falls back on Sort for smallish arrays. 
ObRetort 
Remove (ARGType elem) 

Searches the trove for an element equal to elem, and removes it from the trove and returns OB_OK. 
int64 
RemoveEvery (ARGType elem) 

remove every element that matches. 
ObRetort 
RemoveNth (int64 ind) 

Removes the ind th element of the trove, and returns OB_OK. 
virtual ObRetort 
ReplaceNth (int64 ind, ARGType elem) 

If ind is in range, replaces the ind th element with elem and returns OB_OK. 
ObRetort 
SafeNth (int64 ind, ELEMType &into) const 

Sets into to the ind th element of the trove and returns OB_OK if ind is in range. 
ObRetort 
SetIncSize (unt32 s, float64 multiplier=1.0) 

Configures how this trove will expand. 
void 
Sort (int(*cmp)(ARGType a, ARGType b), int64 left=0, int64 right=1) 

whitesort (nsquared swapbased selection sort) note: this is a placeholder for a better search in the future FYI: [http://en.wikipedia.org/wiki/Selection_sort](http://en.wikipedia.org/wiki/Selection_sort) insertion sort or selection sort are both typically faster for small arrays (i.e. 
ObRetort 
SwapElems (ARGType elem1, ARGType elem2) 

Searches the trove for elements equal to elem1 and elem2. 
ObRetort 
SwapElemsAt (int64 ind1, int64 ind2) 

Swaps the element at ind1 with the element at ind2. 