Tools.h++ Class Reference

Table Of Contents
the value. If duplicates are present, the index of the first instance is returned.
RWBoolean
insert(val v);
Insert the new value v into the vector. A binary search, using the comparison function, is
performed to determine where to insert the value. The item will be inserted after any
duplicates. If the insertion causes the vector to exceed its capacity, it will automatically be
resized by an amount given by RWDEFAULT_RESIZE.
void
removeAt(size_t indx);
Remove the item at position indx from the collection. The value of indx must be between
zero and the length of the collection less one. No bounds checking is performed. Old items
from index indx+1 will be shifted to lower indices. E.g., the item at index indx+1 will be
moved to position indx, etc. .
void
resize(size_t newCapacity);
Change the capacity of the collection to newCapacity, which must be at least as large as the
present number of items in the collection. Note that the actual number of items in the
collection does not change, just the capacity.