A hash set is a collection of items, without any particular order and without repetitions stored in a hash table.
More...
|
| | THashSet (int32=10) |
| | Default constructor, size = number of buckets. More...
|
| |
| | THashSet (THashFunc, int32=10) |
| | Constructor with hash function, size = number of buckets. More...
|
| |
| | THashSet (const THashSet< T > &) |
| | Copy constructor - uses copy, copy used add. More...
|
| |
| | THashSet (THashFunc, const TContainer< T > &) |
| | Container with hash function and container to copy. More...
|
| |
| | ~THashSet () |
| | Destructor. More...
|
| |
| THashSet< T > & | operator= (const THashTable< T > &) |
| | Assignment operator, uses copy. More...
|
| |
| THashSet< T > | operator- (const THashSet< T > &) const |
| | Difference operator. More...
|
| |
| THashSet< T > | operator& (const THashSet< T > &) const |
| | Intersection operator. More...
|
| |
| THashSet< T > | operator| (const THashSet< T > &) const |
| | Union operator. More...
|
| |
| bool | add (const T &) |
| | Add item to set if not already contained. More...
|
| |
| | THashTable (THashFunc, int32=10) |
| | Constructor with hash function. More...
|
| |
| | THashTable (const THashTable< T > &) |
| | Copy constructor. More...
|
| |
| | THashTable (THashFunc, const TContainer< T > &) |
| | Constructor with container. More...
|
| |
| | ~THashTable () |
| | Destructor. More...
|
| |
| THashTable< T > & | operator= (const THashTable< T > &) |
| | Assignment operator, uses copy. More...
|
| |
| void | setHashFunction (THashFunc) |
| | Set hash function. More...
|
| |
| bool | resize (int32) |
| | Resize the table, set number of hash buckets. More...
|
| |
| virtual TContainer< T > * | newInstance () const |
| | Create a copy of this container. More...
|
| |
| virtual int32 | total () const |
| | Return number of items. More...
|
| |
| virtual bool | isEmpty () const |
| | Is container empty? More...
|
| |
| virtual bool | remove (const T &item) |
| | Remove equal item. More...
|
| |
| virtual bool | remove (const TIterator< T > &iter) |
| | Remove item at current iterator position. More...
|
| |
| virtual bool | removeAt (int32 index) |
| | Remove item at given index. More...
|
| |
| virtual void | removeAll () |
| | Remove all items from list. More...
|
| |
| virtual T & | lookup (const T &item) const |
| | Searches for the item equal to the specified item in the list and returns the first occurrence. More...
|
| |
| virtual bool | contains (const T &item) const |
| | See if container has equal item. More...
|
| |
| virtual int32 | occurrences (const T &item) const |
| | Count occurrences of equal items. More...
|
| |
| virtual TIterator< T > * | newIterator () const |
| | Create container iterator instance. More...
|
| |
| | TContainer () |
| |
| | TContainer (const TContainer< T > &) |
| |
| virtual | ~TContainer () |
| |
| bool | operator== (const TContainer< T > &) const |
| |
| bool | operator!= (const TContainer< T > &) const |
| |
| T & | operator[] (int32) const |
| | "[]" indexing operator returns the item at the specified index. More...
|
| |
| virtual int32 | size () const |
| | Returns the container size. More...
|
| |
| virtual T & | at (int32 index) const |
| | Get item at index. More...
|
| |
| TContainer< T > * | lookupAll (const T &item) const |
| | Allocate and returns a container with all items in this container equal to the specified item. More...
|
| |
| bool | addAllFrom (const TContainer< T > &container) |
| | Adds all the items from the specified container to this container. More...
|
| |
| bool | addNewFrom (const TContainer< T > &container) |
| | Adds the items from the specified container to this container that are not in this container already. More...
|
| |
| T & | error () const |
| | Access error object. More...
|
| |
template<class T>
class Steinberg::THashSet< T >
A hash set is a collection of items, without any particular order and without repetitions stored in a hash table.
A hash table stores its items in hash buckets whose pointers are stored in an array at the index given by the hash function, which is a integer function of the item. The buckets are necessary to hold all items with the same hash index.
- See also
- THashTable